help-smalltalk
[Top][All Lists]
Advanced

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

Re: [Help-smalltalk] Segmentation violation


From: Bonzini
Subject: Re: [Help-smalltalk] Segmentation violation
Date: Tue, 5 Feb 2002 10:03:56 +0100

...
poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
write(1, "66", 2)                       = 2
poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
write(1, "\n", 1)                       = 1
...
poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
write(1, "67", 2)                       = 2
poll([{fd=1, events=POLLOUT}], 1, 0)    = 0
poll([{fd=1, events=POLLOUT}], 1, 0)    = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
rt_sigaction(SIGIO, {0x8087e4c, [], 0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGURG, {0x8087e4c, [], 0x4000000}, {SIG_DFL}, 8) = 0
ioctl(1, 0x5309, 0x7)                   = -1 EINVAL (Invalid argument)
fcntl64(1, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(1, F_SETFL, O_RDWR|O_ASYNC)     = 0
getpid()                                = 475
fcntl64(1, F_SETOWN, 475)               = 0
poll([{fd=1, events=POLLOUT}], 1, 0)    = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(1, "\n", 1)                       = 1
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({0, 1000000}, NULL)           = 0
nanosleep({0, 1000000}, NULL)           = 0
nanosleep({0, 1000000}, NULL)           = 0
...
nanosleep({0, 1000000}, NULL)           = 0
nanosleep({0, 1000000}, NULL)           = 0
nanosleep({0, 1000000}, NULL)           = 0
nanosleep({0, 1000000}, NULL)           = 0
nanosleep({0, 1000000}, 0)              = -1 EINTR (Interrupted system call)
--- SIGIO (I/O possible) ---
poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1

Did you press Enter here?

My guess is that the origin of this is a race condition
between the moment poll fails and the moment the file
becomes writable.  I introduced a sigprocmask
around the ioctls and fcntls but it is not enough if I/O
becomes possible between the sigprocmask and the last
fcntl.

Pressing Enter just fires a SIGIO which finds out the
file has become writable; I don't know yet about the
SEGV.

strace introduces a delay so that this is removed.  I
don't know how you managed to reproduce it with
the web server in background.

|_  _  _ __
|_)(_)| ),'
------- '---





reply via email to

[Prev in Thread] Current Thread [Next in Thread]