infinyon / node-bindgen

Easy way to write Node.js module using Rust
Apache License 2.0
531 stars 44 forks source link

[Merged by Bors] - Examples segfault handler #253

Closed morenol closed 1 year ago

morenol commented 1 year ago

For me, this fails with:

PID 72793 received SIGSEGV for address: 0x8
0   segfault-handler.node               0x0000000107ac4fc4 _ZL16segfault_handleriP9__siginfoPv + 288
1   libsystem_platform.dylib            0x00000001a02e02a4 _sigtramp + 56
2   index.node                          0x0000000117e9b8a8 _ZN22nj_example_class_async8MyObject9multiply228_$u7b$$u7b$closure$u7d$$u7d$17hfee87219318bc616E + 676
3   index.node                          0x0000000117e96c6c _ZN7nj_core6worker14create_promise28_$u7b$$u7b$closure$u7d$$u7d$17hf55586701752077aE + 360
4   index.node                          0x0000000117e90ad4 _ZN101_$LT$async_std..task..builder..SupportTaskLocals$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$4poll28_$u7b$$u7b$closure$u7d$$u7d$17h2af095a213c64b50E + 60
5   index.node                          0x0000000117e904a8 _ZN9async_std4task19task_locals_wrapper17TaskLocalsWrapper11set_current28_$u7b$$u7b$closure$u7d$$u7d$17h387a9de4ee21ff8eE + 164
6   index.node                          0x0000000117e8fbf4 _ZN3std6thread5local17LocalKey$LT$T$GT$8try_with17hc5c0e630cfc8eeabE + 316
7   index.node                          0x0000000117e8f488 _ZN3std6thread5local17LocalKey$LT$T$GT$4with17hbcd478204d2f8f47E + 24
8   index.node                          0x0000000117e903f4 _ZN9async_std4task19task_locals_wrapper17TaskLocalsWrapper11set_current17hd5b12c587ccdd56dE + 68
9   index.node                          0x0000000117e90a34 _ZN101_$LT$async_std..task..builder..SupportTaskLocals$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h9af9ef9793330a74E + 68
10  index.node                          0x0000000117e99568 _ZN14async_executor8Executor5spawn28_$u7b$$u7b$closure$u7d$$u7d$17h0b95a313f3a7166fE + 420
11  index.node                          0x0000000117ea49f4 _ZN10async_task3raw28RawTask$LT$F$C$T$C$S$C$M$GT$3run17hfd8facd217bba3eeE + 748
12  index.node                          0x0000000117ee79b8 _ZN10async_task8runnable17Runnable$LT$M$GT$3run17h29e67332be272b1bE + 144
13  index.node                          0x0000000117ed6e30 _ZN14async_executor8Executor3run28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17h37246b81f67c103bE + 780
14  index.node                          0x0000000117edd2b0 _ZN88_$LT$futures_lite..future..Or$LT$F1$C$F2$GT$$u20$as$u20$core..future..future..Future$GT$4poll17hcdb409008d9e554bE + 112
15  index.node                          0x0000000117ed6a44 _ZN14async_executor8Executor3run28_$u7b$$u7b$closure$u7d$$u7d$17h4b355693dcc2ba51E + 472
16  index.node                          0x0000000117edd1f8 _ZN88_$LT$futures_lite..future..Or$LT$F1$C$F2$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h77d54035f785c177E + 112
17  index.node                          0x0000000117ec8890 _ZN8async_io6driver8block_on17he5cd786a8089b033E + 896
18  index.node                          0x0000000117ed2b84 _ZN21async_global_executor7reactor8block_on28_$u7b$$u7b$closure$u7d$$u7d$17he2002feafb94507cE + 48
19  index.node                          0x0000000117ed2a2c _ZN21async_global_executor7reactor8block_on17h511e436bbe220018E + 48
20  index.node                          0x0000000117ed8da0 _ZN21async_global_executor9threading16thread_main_loop28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17h88a8f5a6246531beE + 208
21  index.node                          0x0000000117ed0f44 _ZN3std6thread5local17LocalKey$LT$T$GT$8try_with17hac090645b47e80e8E + 300
22  index.node                          0x0000000117ecfaa4 _ZN3std6thread5local17LocalKey$LT$T$GT$4with17h9eba1cc248122ffaE + 32
23  index.node                          0x0000000117ed8cc4 _ZN21async_global_executor9threading16thread_main_loop28_$u7b$$u7b$closure$u7d$$u7d$17hf062fe835dca5235E + 40
24  index.node                          0x0000000117ed1b00 _ZN3std9panicking3try7do_call17ha3bde356bb245df6E + 64
25  index.node                          0x0000000117ed2bb4 __rust_try + 32
plus two is  20
26  index.node                          0x0000000117ed18ec _ZN3std9panicking3try17h66d47ee5b91d85c7E + 64
27  index.node                          0x0000000117ecf704 _ZN3std5panic12catch_unwind17h5cd552a1fc155578E + 24
28  index.node                          0x0000000117ed8b38 _ZN21async_global_executor9threading16thread_main_loop17h26f38e74682022e4E + 264
29  index.node                          0x0000000117eda7f8 _ZN4core3ops8function6FnOnce9call_once17h64392cc989c51ff8E + 16
30  index.node                          0x0000000117ecf6c4 _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h3f6bc966efa5d46aE + 16
31  index.node                          0x0000000117ed801c _ZN3std6thread7Builder16spawn_unchecked_28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17h346cc67645e7e6e2E + 16
sehz commented 1 year ago

I was able to reproduce issue on my mac

$ nvm install 18.17.1

$ make test-examples
sleeping
make[2]: *** [test] Segmentation fault: 11
make[1]: *** [test-promise] Error 2
make: *** [test-examples] Error 2
morenol commented 1 year ago

bors r+

bors[bot] commented 1 year ago

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here. For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.