Summary
Interrupting a tcp read operation causes a crash
Metadata
- Id: 996ef8d0a2a18bf2536171978f12a94d839a9a80
- Trac id: 486
- Type: defect
- Reporter: zbigniew
- Owner: zbigniew
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: 4.9.0
- Version: 4.6.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2011-01-22 06:07:45 UTC
- Keywords: tcp scheduler crash girl interrupted
Attachments
- 996ef8d0a2a18bf2536171978f12a94d839a9a80/attachments/no-scheduler-panic-on-wrong-blocking-fd-and-thanks-for-the-bug-report.diff
Description
In 4.6.4 at the interpreter, if I read from an open tcp port with no available data, and then interrupt the operation with Ctrl-C, the system will crash the next time I try to open a TCP connection.
This happens with 4.6.4 from Dec 12 2010 and from Jan 21 2011. It does NOT occur with 4.5.8. I did not investigate further (because Felix will figure this out in 5 seconds), but I wonder if it happened during the safer-scheduler merge.
If you prefer, I can git bisect this to track it down.
CHICKEN (c)2008-2010 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.6.4 (experimental) macosx-unix-gnu-x86 [ manyargs dload ptables ] compiled 2010-12-16 on amaranth.xorinia.dim (Darwin) ; loading /Users/jim/.csirc ... #;1> (use tcp posix) ; loading library tcp ... ; loading library posix ... #;2> (define-values (i o) (tcp-connect "3e8.org" 80)) #;3> (read-string #f i) C-c C-c *** user interrupt *** #;3> (define-values (i o) (tcp-connect "3e8.org" 80)) ##sys#unblock-threads-for-i/o: thread on fd-list has wrong FD Process scheme exited abnormally with code 70
Changes and comments
[2011-01-24 19:13:17 UTC] felix wrote:
This is a diagnostic error check being introduced during the spiffy debugging phase. I will keep the error but try to change the current behavior into keeping on execution.
[2011-01-24 19:31:10 UTC] felix attached no-scheduler-panic-on-wrong-blocking-fd-and-thanks-for-the-bug-report.diff (description=#f)
[2011-01-24 19:31:41 UTC] felix wrote:
Please try to attached patch - your example works for me now.
[2011-02-09 10:49:58 UTC] felix changed status from new to assigned
[2011-02-09 10:49:58 UTC] felix changed owner from felix to zbigniew
[2011-02-27 21:01:53 UTC] zbigniew changed status from assigned to closed
[2011-02-27 21:01:53 UTC] zbigniew set resolution to fixed
[2011-02-27 21:01:53 UTC] zbigniew wrote:
Yes, I can no longer reproduce the problem.
I was also getting a different crash previously, however I cannot currently reproduce it (even on the old unpatched version!). So closing ticket for now.
#;1> (use posix) ; loading library posix ... #;2> (use tcp) ; loading library tcp ... #;3> (tcp-connect-timeout 20000) #;4> (define-values (i o) (tcp-connect "3e8.org" 8081)) C-c C-c *** user interrupt *** #;4> (define-values (i o) (tcp-connect "3e8.org" 8081)) Bus error
[2011-06-01 09:00:41 UTC] felix wrote:
Milestone 4.7.0 deleted
[2011-06-01 09:00:41 UTC] felix changed milestone from 4.7.0 to 4.8.0
[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted