Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid memory access in Fibers #4344

Closed
bararchy opened this issue Apr 27, 2017 · 4 comments
Closed

Invalid memory access in Fibers #4344

bararchy opened this issue Apr 27, 2017 · 4 comments

Comments

@bararchy
Copy link
Contributor

lldb:

* thread #1, name = 'my_program', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: my_program`__crystal_main at fiber.cr:74
   71  	    {% end %}
   72  	
   73  	    @prev_fiber = nil
-> 74  	    if last_fiber = @@last_fiber
   75  	      @prev_fiber = last_fiber
   76  	      last_fiber.next_fiber = @@last_fiber = self
   77  	    else
(lldb) bt
* thread #1, name = 'my_program', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: my_program`__crystal_main at fiber.cr:74
    frame #1: my_program`main at main.cr:12
    frame #2: 0x00007ffff60ee511 libc.so.6`__libc_start_main + 241
    frame #3: 0x0000555555556dfa my_program`_start + 42

Crash without debugger:

Invalid memory access (signal 11) at address 0x0
[0x55e848c9eb56] ???
[0x55e848c64b20] __crystal_sigfault_handler +32
[0x7f350d775fe0] ???
[0x55e848c45932] ???
[0x55e848c645be] main +46
[0x7f350cb73511] __libc_start_main +241
[0x55e848c42dfa] _start +42
[0x0] ???
@kostya
Copy link
Contributor

kostya commented Apr 27, 2017

may be related: #3900

@bararchy
Copy link
Contributor Author

@kostya I do use IO.select , should it be avoided ?

@RX14
Copy link
Contributor

RX14 commented Apr 27, 2017

IO.select should be removed anyway as it blocks the event loop.

@bararchy
Copy link
Contributor Author

Removing Select from my code and adding more checks indeed made this thing go away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants