tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: hangup in close(2) after posix_openpt(3)



joerg@ wrote:

> On Sun, Oct 18, 2015 at 03:27:07AM +0900, Izumi Tsutsui wrote:
> > joerg@ wrote:
> > 
> > > On Sat, Oct 17, 2015 at 03:23:44PM +0900, Izumi Tsutsui wrote:
> > > > I notice we can avoid the hangup in lwp_park() after exit(3)
> > > > by calling _exit(2) instead exit(3) in the parent canuum,
> > > > so I'll put it as a kludge for now.
> > > 
> > > Be careful, that bypasses all atexit handler. The reason why it might
> > > work is that this includes the fflush of stdin and stdout.
> > 
> > Do you have any idea about "hangup in lwp_park() after exit(3)"?
> > Is it a bug, or expected behavior?
> 
> Certainly not expected behavior. Can you get a backtrace from the
> affected process?

It looks gdb doesn't show useful info:
(the following canuum binary is modified to use the original exit(3),
 not _exit(2) in pkgsrc patch)
---
(gdb) run
Starting program: /usr/pkgsrc/inputmethod/canna-canuum/work.i386/Canna37p3/canuum/canuum 
[ start message in ja_JP.ISO-2022-JP ]
% exit
exit

[ exit message in ja_JP.ISO-2022-JP ]

[ send kill -STOP from other terminal ]
Program received signal SIGSTOP, Stopped (signal).
0xbbbf9957 in ___lwp_park60 () from /usr/libexec/ld.elf_so
(gdb) bt
#0  0xbbbf9957 in ___lwp_park60 () from /usr/libexec/ld.elf_so
(gdb) info thread
  Id   Target Id         Frame 
* 1    process 14999     0xbbbf9957 in ___lwp_park60 ()
   from /usr/libexec/ld.elf_so
(gdb) 

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index