Subject: Re: "parked" processes?
To: Andrew Doran <ad@netbsd.org>
From: Adam Hamsik <haaaad@gmail.com>
List: current-users
Date: 08/03/2007 11:32:25
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


hi
On Jul 28, 2007, at 12:34 AM, Andrew Doran wrote:

> On Fri, Jul 27, 2007 at 02:29:15PM -0600, Brian de Alwis wrote:
>
>> On 2007.07.27 21:12:30 +0100, Andrew Doran wrote:
>>> A gcore on the process won't kill it but will give you a core  
>>> file. Please
>>> let me know if you have gotten a core and I'll give you details  
>>> of an ftp
>>> server where you can upload it.
>>
>> Hmm, I can't seem to do a gcore:
>>
>>     $ gcore 923
>>     gcore: ptrace(PT_DUMPCORE) to 923 failed: File too large
>>     $ df -h .
>>     Filesystem        Size       Used      Avail %Cap Mounted on
>>     /dev/wd0a          45G        38G       4.8G  88% /
>
> You need to adjust the max coredump size with ulimit -c. Without  
> looking
> that probably needs to be done in the shell before you start  
> firefox, not
> before gcore.
>
>> Interestingly, running the gcore actually deparked the process and
>> it continued like nothing had happened.
>
> That's positive in that it suggests there is an undiscovered sync  
> issue in
> the pthread library / kernel. Unfortunatley it also suggests a bug  
> in the
> way gcore works, it shouldn't have visible effects for the process  
> which is
> being dumped. :-)
>
> Andrew
Today I reproduced firefox parked state. on my NetBSD 4.99.22 (I will  
upgrade it next week and try to reproduce problem again.) I uploaded  
core file at [1] it's 30MB.

Note: Firefox become parked in time of kernel compilation.

Core was generated by `firefox-bin'.
#0  0xbb173693 in _lwp_park () from /usr/lib/libc.so.12
(gdb) bt
#0  0xbb173693 in _lwp_park () from /usr/lib/libc.so.12
#1  0xbb2474b2 in pthread__park () from /usr/lib/libpthread.so.0
#2  0xbb245140 in pthread_mutex_lock () from /usr/lib/libpthread.so.0
#3  0xbba4cfb1 in PR_Lock () from /usr/pkg/lib/firefox/libnspr4.so
#4  0xbba4d10e in PR_EnterMonitor () from /usr/pkg/lib/firefox/ 
libnspr4.so
#5  0xbbafc0a3 in PL_ProcessPendingEvents () from /usr/pkg/lib/ 
firefox/libxpcom_core.so
#6  0xbbafdc9f in nsEventQueueImpl::ProcessPendingEvents ()
    from /usr/pkg/lib/firefox/libxpcom_core.so
#7  0xbae2b8fe in non-virtual thunk to nsWindow::QueryInterface(nsID  
const&, void**) ()
    from /usr/pkg/lib/firefox/components/libwidget_gtk2.so
#8  0x080ce900 in ?? ()
#9  0x00000000 in ?? ()

  vmstat -t                                         5
procs            memory
ru dw pw sl sw   total-v  active-v  active-r vm-sh avm-sh rm-sh arm- 
sh free
  1 11  0  8  0    175774    105688    105688     0      0     0       
0 15571

  procs    memory      page                       disks   faults       
cpu
  r b w    avm    fre  flt  re  pi   po   fr   sr m0 w0   in   sy  cs  
us sy id
  0 11 0 422780 62252 1871   0   0    0    9   13  0 13  149 2722 472  
16  3 81







[1] http://wasabi.fiit.stuba.sk/~haad/netbsd/firefox-bin.core.bz2

Regards
- -----------------------------------------
Adam Hamsik
jabber: haad@jabber.org
icq: 249727910

Proud NetBSD user.

We program to have fun.
Even when we program for money, we want to have fun as well.
~ Yukihiro Matsumoto




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFGsvYqlIxPgX3Go0MRAvEbAJ4tQot0S9xqmxzPW8b5zJpId66ZTwCfbfPF
NUWOFlhXwR3+XcQ76EasAL8=
=+bWP
-----END PGP SIGNATURE-----