orthecreedence / cl-async

Asynchronous IO library for Common Lisp.
MIT License
273 stars 40 forks source link

Segfault #81

Closed orthecreedence closed 10 years ago

orthecreedence commented 11 years ago

Note that I cannot reliably reproduce this. It happens every once in a while while using Wookie in a live web environment.

Looks like it's trying to enable/reference a bufferevent that is either freed or was somehow lost in the shuffle of data pointers. Need to inspect tcp.lisp and look for potential issues.

(start) Starting Wookie  0.0.0.0:9060
Unhandled exception 11 at 0x84daa29, context->regs at #xb739ab68
Exception occurred while executing foreign code
received signal 11; faulting address: 0x5
address not mapped to object
? for help
[32627] Clozure CL kernel debugger: b
current thread: tcr = 0xb739ba70, native thread ID = 0x7f74, interrupts enabled

(#xB7236CE4) #x18A8FD9D : #<Function BUFFEREVENT-ENABLE #x18A8FCF6> + 167
(#xB7236CF4) #x18C6C47D : #<Function (:INTERNAL WRITE-SOCKET-DATA) #x18C6C456> + 39
(#xB7236D04) #x18C5F235 : #<Function CL-ASYNC::TIMER-CB #x18C5ED36> + 1279
(#xB7236D60) #x10193215 : #<Function %PASCAL-FUNCTIONS% #x101930BE> + 343
(#xB7236DA8) #x18A8B21D : #<Function EVENT-BASE-DISPATCH #x18A8B19E> + 127
(#xB7236DB4) #x18C4D5F5 : #<Function START-EVENT-LOOP #x18C4D026> + 1487
(#xB7236E30) #x194A8275 : #<Function START #x194A812E> + 327
(#xB7236E4C) #x104AC35D : #<Function CALL-CHECK-REGS #x104AC266> + 247
(#xB7236E68) #x104AF4BD : #<Function CHEAP-EVAL #x104AF466> + 87
(#xB7236E84) #x105209ED : #<Function (:INTERNAL EVAL-STRING STARTUP-CCL) #x1052083E> + 431
(#xB7236EA8) #x10417CFD : #<Function STARTUP-CCL #x1041776E> + 1423
(#xB7236ED8) #x10417F85 : #<Function (:INTERNAL (TOPLEVEL-FUNCTION (LISP-DEVELOPMENT-SYSTEM T))) #x10417F4E> + 55
(#xB7236EE8) #x1051FCFD : #<Function (:INTERNAL MAKE-MCL-LISTENER-PROCESS) #x1051FACE> + 559
(#xB7236F34) #x1042C5D5 : #<Function RUN-PROCESS-INITIAL-FORM #x1042C356> + 639
(#xB7236F78) #x1042CE55 : #<Function (:INTERNAL (%PROCESS-PRESET-INTERNAL (PROCESS))) #x1042CC4E> + 519
(#xB7236FCC) #x1040520D : #<Function (:INTERNAL THREAD-MAKE-STARTUP-FUNCTION) #x1040510E> + 255
[32627] Clozure CL kernel debugger: k
Killed
orthecreedence commented 11 years ago

Got this again:

(tagit) Caught error: Closed TCP socket being operated on: #<SOCKET #x19DB9B36>.
Unhandled exception 11 at 0x9008bb0, context->regs at #xb73beb68
Exception occurred while executing foreign code
received signal 11; faulting address: 0x6
address not mapped to object
? for help
[845] Clozure CL kernel debugger: b
current thread: tcr = 0xb73bfa70, native thread ID = 0x34e, interrupts enabled

(#xB725ACE4) #x18AA04AD : #<Function BUFFEREVENT-ENABLE #x18AA0406> + 167
(#xB725ACF4) #x18C808DD : #<Function (:INTERNAL WRITE-SOCKET-DATA) #x18C808B6> + 39
(#xB725AD04) #x18C56DB5 : #<Function CL-ASYNC::TIMER-CB #x18C568B6> + 1279
(#xB725AD60) #x10193215 : #<Function %PASCAL-FUNCTIONS% #x101930BE> + 343
(#xB725ADA8) #x18A8733D : #<Function EVENT-BASE-DISPATCH #x18A872BE> + 127
(#xB725ADB4) #x18C47615 : #<Function START-EVENT-LOOP #x18C47046> + 1487
(#xB725AE30) #x194A7E95 : #<Function START #x194A7D4E> + 327
(#xB725AE4C) #x104AC35D : #<Function CALL-CHECK-REGS #x104AC266> + 247
(#xB725AE68) #x104AF4BD : #<Function CHEAP-EVAL #x104AF466> + 87
(#xB725AE84) #x105209ED : #<Function (:INTERNAL EVAL-STRING STARTUP-CCL) #x1052083E> + 431
(#xB725AEA8) #x10417CFD : #<Function STARTUP-CCL #x1041776E> + 1423
(#xB725AED8) #x10417F85 : #<Function (:INTERNAL (TOPLEVEL-FUNCTION (LISP-DEVELOPMENT-SYSTEM T))) #x10417F4E> + 55
(#xB725AEE8) #x1051FCFD : #<Function (:INTERNAL MAKE-MCL-LISTENER-PROCESS) #x1051FACE> + 559
(#xB725AF34) #x1042C5D5 : #<Function RUN-PROCESS-INITIAL-FORM #x1042C356> + 639
(#xB725AF78) #x1042CE55 : #<Function (:INTERNAL (%PROCESS-PRESET-INTERNAL (PROCESS))) #x1042CC4E> + 519
(#xB725AFCC) #x1040520D : #<Function (:INTERNAL THREAD-MAKE-STARTUP-FUNCTION) #x1040510E> + 255
[845] Clozure CL kernel debugger: k
Killed
orthecreedence commented 11 years ago

Been running Wookie in full-logging mode for weeks now, no such segfault.

orthecreedence commented 10 years ago

Maybe an OOM error, haven't seen this in a year now. Closing.