<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>493</bug_id>
          
          <creation_ts>2010-10-19 20:41:29 +0000</creation_ts>
          <short_desc>OProfileServer spawning of oprofilectl failure will show through OProfile-viewer</short_desc>
          <delta_ts>2011-01-07 17:31:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Eclipse Plugin</product>
          <component>eclipse-plugin</component>
          <version>1.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jessica">jessica.zhang</reporter>
          <assigned_to name="Jessica">jessica.zhang</assigned_to>
          <cc>josh</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>lianhao.lu</cc>
    
    <cc>liping.ke</cc>
    
    <cc>sgw</cc>
    
    <cc>yongkang.you</cc>
    
    <cc>yp.ep.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          <cf_verified>Program Management</cf_verified>
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>10677</commentid>
    <comment_count>0</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2010-10-19 20:41:29 +0000</bug_when>
    <thetext>If OProfileServer ended in an endless loop of spawning of oprofilectl failures, tried to connect oprofile-viewer to the server, the oprofile-viewer will also be locked up by the endless failure</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10900</commentid>
    <comment_count>1</comment_count>
    <who name="Lianhao Lu">lianhao.lu</who>
    <bug_when>2010-11-14 21:46:26 +0000</bug_when>
    <thetext>In a new fresh environment after booting, the client(oprofile-viewer) will do the following things to when user clicks the button connect to the target(oprofile-server):

1. connect the TCP socket
2. send the STATUS command
3. after get the reply of the STATUS command, send the CONFIG command
4. after get the reply of the CONFIG command, send the STATUS command again to check whether it needs to CONFIG again.

The endless loop occurs because when the client gets the response of the CONFIG command, it always sends the STATUS command no matter whether the CONFIG succeeds or not. If the CONFIG keeps failing the client will keep sending STATUS/CONFIG commands.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10901</commentid>
    <comment_count>2</comment_count>
      <attachid>67</attachid>
    <who name="Lianhao Lu">lianhao.lu</who>
    <bug_when>2010-11-14 22:03:25 +0000</bug_when>
    <thetext>Created attachment 67
patch for adding CONFIG response check

This patch should be applied to oprofileUI svn rev 197.

It added the checking of the CONFIG response and made it only re-send the STATUS command for successful CONFIG.

The patch is put here temporarily until we get it upstreamed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10984</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2010-12-02 05:45:10 +0000</bug_when>
    <thetext>Hi,

Firstly can you please try and maintain the projects coding style when you create patches. Admittedly the project style isn&apos;t documented but it&apos;s quite easy to infer from reading the code. Compare the patched main_config_response():

void
main_config_response_cb (gboolean success, gchar *err_message)
{
  if (!success)
  {
    main_generic_error (err_message);
    main_set_state (OPUI_DISCONNECTING);
    client_disconnect (client);
  } else 
  {
    client_send_command_status (client);
    main_set_state(OPUI_CONNECTED_WAIT);
  }
}

to the main_connect_response_cb() from earlier in the file:

void
main_connect_response_cb (gboolean success, gchar *err_message)
{
  if (!success)
    {
      main_generic_error (err_message);
      main_set_state(OPUI_DISCONNECTED);
    } else {
      client_send_command_status (client);
      main_set_state(OPUI_CONNECTED_WAIT);
    }
}

Immediately we can see that the braces should be indented 2 spaces, the else statement be on the same line as the closing brace of the if and opening brace of the else and that there should be a space between the function name and opening bracket of a function call.

Once those stylistic fixes are made we can merge this patch, thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10991</commentid>
    <comment_count>4</comment_count>
      <attachid>73</attachid>
    <who name="Lianhao Lu">lianhao.lu</who>
    <bug_when>2010-12-02 18:08:42 +0000</bug_when>
    <thetext>Created attachment 73
patch for adding CONFIG response check

This patch should be applied to oprofileUI svn rev 197.

It added the checking of the CONFIG response and made it only re-send the
STATUS command for successful CONFIG.

It implied some coding stylistic fixes to the obsoleted patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10996</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2010-12-03 04:58:34 +0000</bug_when>
    <thetext>Looks good, thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11076</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2010-12-10 07:39:40 +0000</bug_when>
    <thetext>Merged into the new oprofileui git repo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11146</commentid>
    <comment_count>7</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2010-12-13 16:31:38 +0000</bug_when>
    <thetext>verified 12-13-10</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>67</attachid>
            <date>2010-11-14 22:03:25 +0000</date>
            <delta_ts>2010-12-02 18:08:42 +0000</delta_ts>
            <desc>patch for adding CONFIG response check</desc>
            <filename>patch.txt</filename>
            <type>text/plain</type>
            <size>569</size>
            <attacher name="Lianhao Lu">lianhao.lu</attacher>
            
              <data encoding="base64">SW5kZXg6IHNyYy9tYWluLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3JjL21haW4uYwkocmV2aXNpb24gMTk3
KQorKysgc3JjL21haW4uYwkod29ya2luZyBjb3B5KQpAQCAtMjg4LDEwICsyODgsMTUgQEAKIG1h
aW5fY29uZmlnX3Jlc3BvbnNlX2NiIChnYm9vbGVhbiBzdWNjZXNzLCBnY2hhciAqZXJyX21lc3Nh
Z2UpCiB7CiAgIGlmICghc3VjY2VzcykKKyAgewogICAgIG1haW5fZ2VuZXJpY19lcnJvciAoZXJy
X21lc3NhZ2UpOwotCi0gIGNsaWVudF9zZW5kX2NvbW1hbmRfc3RhdHVzIChjbGllbnQpOwotICBt
YWluX3NldF9zdGF0ZShPUFVJX0NPTk5FQ1RFRF9XQUlUKTsKKyAgICBtYWluX3NldF9zdGF0ZSAo
T1BVSV9ESVNDT05ORUNUSU5HKTsKKyAgICBjbGllbnRfZGlzY29ubmVjdCAoY2xpZW50KTsKKyAg
fSBlbHNlIAorICB7CisgICAgY2xpZW50X3NlbmRfY29tbWFuZF9zdGF0dXMgKGNsaWVudCk7Cisg
ICAgbWFpbl9zZXRfc3RhdGUoT1BVSV9DT05ORUNURURfV0FJVCk7CisgIH0KIH0KIAogdm9pZAo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>73</attachid>
            <date>2010-12-02 18:08:42 +0000</date>
            <delta_ts>2010-12-02 18:08:42 +0000</delta_ts>
            <desc>patch for adding CONFIG response check</desc>
            <filename>bug493.patch</filename>
            <type>text/plain</type>
            <size>581</size>
            <attacher name="Lianhao Lu">lianhao.lu</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL3NyYy9tYWluLmMgYi9zcmMvbWFpbi5jCmluZGV4IDk5Yzc3NzkuLjdhMDg5
YmIgMTAwNjQ0Ci0tLSBhL3NyYy9tYWluLmMKKysrIGIvc3JjL21haW4uYwpAQCAtMjg4LDEwICsy
ODgsMTQgQEAgdm9pZAogbWFpbl9jb25maWdfcmVzcG9uc2VfY2IgKGdib29sZWFuIHN1Y2Nlc3Ms
IGdjaGFyICplcnJfbWVzc2FnZSkKIHsKICAgaWYgKCFzdWNjZXNzKQotICAgIG1haW5fZ2VuZXJp
Y19lcnJvciAoZXJyX21lc3NhZ2UpOwotCi0gIGNsaWVudF9zZW5kX2NvbW1hbmRfc3RhdHVzIChj
bGllbnQpOwotICBtYWluX3NldF9zdGF0ZShPUFVJX0NPTk5FQ1RFRF9XQUlUKTsKKyAgICB7Cisg
ICAgICBtYWluX2dlbmVyaWNfZXJyb3IgKGVycl9tZXNzYWdlKTsKKyAgICAgIG1haW5fc2V0X3N0
YXRlIChPUFVJX0RJU0NPTk5FQ1RJTkcpOworICAgICAgY2xpZW50X2Rpc2Nvbm5lY3QgKGNsaWVu
dCk7CisgICAgfSBlbHNlIHsKKyAgICAgIGNsaWVudF9zZW5kX2NvbW1hbmRfc3RhdHVzIChjbGll
bnQpOworICAgICAgbWFpbl9zZXRfc3RhdGUgKE9QVUlfQ09OTkVDVEVEX1dBSVQpOworICAgIH0K
IH0KIAogdm9pZAo=
</data>

          </attachment>
      

    </bug>

</bugzilla>