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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>56116</bug_id>
          
          <creation_ts>2011-03-10 10:05:47 -0800</creation_ts>
          <short_desc>[Qt][WK2] Need a way to debug the web process after the UI process dies</short_desc>
          <delta_ts>2011-03-18 15:25:04 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P5</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Balazs Kelemen">kbalazs</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>commit-queue</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>365270</commentid>
    <comment_count>0</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-03-10 10:05:47 -0800</bug_when>
    <thetext>We disallow the web process to live out it&apos;s parent dead: prctl(PR_SET_PDEATHSIG, SIGKILL)
For developers it could be useful to be able to debug a web process that&apos;s parent has already died.
Another debugging issue with the current setup is that when one attach to the web process
via &apos;set-follow-fork-mode child&apos; and press ^C to interrupt the web process it terminates immediately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>365282</commentid>
    <comment_count>1</comment_count>
      <attachid>85343</attachid>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-03-10 10:17:26 -0800</bug_when>
    <thetext>Created attachment 85343
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366919</commentid>
    <comment_count>2</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2011-03-14 03:35:43 -0700</bug_when>
    <thetext>Out of curiosity, what was the use case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>367058</commentid>
    <comment_count>3</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-03-14 10:45:49 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Out of curiosity, what was the use case?

(gdb) set follow-fork-mode child
(gdb) r
Starting program: /home/balazs/master_clean/WebKitBuild/Debug/bin/MiniBrowser 
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffebf45710 (LWP 28471)]
[New Thread 0x7fffeb744710 (LWP 28472)]
[New process 28473]
[Thread debugging using libthread_db enabled]
process 28473 is executing new program: /home/balazs/master_clean/WebKitBuild/Debug/bin/QtWebProcess
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffebf45710 (LWP 28571)]
[New Thread 0x7fffea7f2710 (LWP 28572)]
^C[Thread 0x7fffea7f2710 (LWP 28572) exited]
[Thread 0x7fffebf45710 (LWP 28571) exited]

Program terminated with signal SIGKILL, Killed.
The program no longer exists.

With the patch via ^C the debugger can normally interrupt execution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>367083</commentid>
    <comment_count>4</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2011-03-14 11:25:07 -0700</bug_when>
    <thetext>I understand that can happen, but what is the use case for debugging the Web process without having the UI process? It is not like anything will happen and the memory dump seems just as useful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>367342</commentid>
    <comment_count>5</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-03-14 16:40:19 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; I understand that can happen, but what is the use case for debugging the Web process without having the UI process? It is not like anything will happen and the memory dump seems just as useful.

Oh, I see. Yes, maybe this possibility is not really valuable
but it is really annoying that one cannot interrupt the execution 
while debugging. It&apos;s not clear to me why the UI process exiting
in that case, maybe gdb is not compatible with our usage of prctl.
The target of the patch is to work around this behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369726</commentid>
    <comment_count>6</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-03-18 10:59:05 -0700</bug_when>
    <thetext>ping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369764</commentid>
    <comment_count>7</comment_count>
      <attachid>85343</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2011-03-18 11:51:45 -0700</bug_when>
    <thetext>Comment on attachment 85343
Patch

Ok, read your comments again, and I finally understand why I don&apos;t have the problem.
I only gdb the QtWebProcess, by attaching to it. Your use case make sense, I did not fully understand it.

Please document QT_WEBKIT_KEEP_ALIVE_WEB_PROCESS on the Wiki.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369842</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-03-18 13:55:17 -0700</bug_when>
    <thetext>The commit-queue encountered the following flaky tests while processing attachment 85343:

webarchive/test-link-rel-icon.html bug 56663 (author: ddkilzer@webkit.org)
The commit-queue is continuing to process your patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369843</commentid>
    <comment_count>9</comment_count>
      <attachid>85343</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-03-18 13:57:28 -0700</bug_when>
    <thetext>Comment on attachment 85343
Patch

Clearing flags on attachment: 85343

Committed r81507: &lt;http://trac.webkit.org/changeset/81507&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369844</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-03-18 13:57:33 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369954</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-03-18 15:25:04 -0700</bug_when>
    <thetext>The commit-queue encountered the following flaky tests while processing attachment 85343:

webarchive/test-link-rel-icon.html bug 56663 (author: ddkilzer@webkit.org)
The commit-queue is continuing to process your patch.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>85343</attachid>
            <date>2011-03-10 10:17:26 -0800</date>
            <delta_ts>2011-03-18 13:57:27 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-56116-20110310181725.patch</filename>
            <type>text/plain</type>
            <size>1710</size>
            <attacher name="Balazs Kelemen">kbalazs</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogODA3MjEKZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwppbmRleCAzNTAwMDNkMDRjZTUwZTQw
N2Q3Yjg1ZDU5NzA4MThmZGNiNWE3NmMzLi41ZjlmZWRkOTYzNTIzNDRkZDcwZmU4N2M3MDg3NDI3
NGNiNGE1ZDNkIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKKysrIGIvU291
cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0yLDYgKzIsMjMgQEAKIAogICAgICAgICBSZXZpZXdl
ZCBieSBOT0JPRFkgKE9PUFMhKS4KIAorICAgICAgICBbUXRdW1dLMl0gTmVlZCBhIHdheSB0byBk
ZWJ1ZyB0aGUgd2ViIHByb2Nlc3MgYWZ0ZXIgdGhlIFVJIHByb2Nlc3MgZGllcworICAgICAgICBo
dHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Z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