Open jminor opened 2 years ago
I haven't been able to catch this in the debugger with the vweb sample code, but I did get this with my larger application which is having similar crashes.
(base) ~/git/hashfs ⭐ lldb ./hashfs
(lldb) target create "./hashfs"
Current executable set to '/Users/jminor/git/hashfs/hashfs' (x86_64).
(lldb) run -root data_md5
Process 6289 launched: '/Users/jminor/git/hashfs/hashfs' (x86_64)
HashFS root folder: /Users/jminor/git/hashfs/data_md5
MD5-60eea08b4d9fb2a23487e64ca88ab29d image/png 9725 c64_logo.png
MD5-78615d9306bf038ac658c8d6a194f855 image/jpeg 39176 Hilda.jpg
MD5-34b4bb9502e8513dc7bd906d7f1efca6 image/jpeg 22790 kitten.jpg
[Vweb] Running app on http://localhost:7777/
upload upfile:
wrote {"hash":"MD5-60eea08b4d9fb2a23487e64ca88ab29d","size":9725,"content_type":"image/png","original_filename":"c64_logo.png","upload_date":"Sun, 17 Jul 2022 13:00:29 UTC"} to meta file /Users/jminor/git/hashfs/data_md5/MD5-60eea08b4d9fb2a23487e64ca88ab29d.meta
saved: #1 c64_logo.png image/png 9725 bytes as /Users/jminor/git/hashfs/data_md5/MD5-60eea08b4d9fb2a23487e64ca88ab29d
meta: {"hash":"MD5-60eea08b4d9fb2a23487e64ca88ab29d","size":9725,"content_type":"image/png","original_filename":"c64_logo.png","upload_date":"Sun, 17 Jul 2022 13:00:29 UTC"}
Collecting from unknown thread
Process 6289 stopped
* thread #11, stop reason = signal SIGABRT
frame #0: 0x00007ff813ccf00e libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
-> 0x7ff813ccf00e <+10>: jae 0x7ff813ccf018 ; <+20>
0x7ff813ccf010 <+12>: movq %rax, %rdi
0x7ff813ccf013 <+15>: jmp 0x7ff813cc91c5 ; cerror_nocancel
0x7ff813ccf018 <+20>: retq
Target 0: (hashfs) stopped.
(lldb) where
error: 'where' is not a valid command.
(lldb) bt
* thread #11, stop reason = signal SIGABRT
* frame #0: 0x00007ff813ccf00e libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x00007ff813d051ff libsystem_pthread.dylib`pthread_kill + 263
frame #2: 0x00007ff813c50d24 libsystem_c.dylib`abort + 123
frame #3: 0x00000001088e7ac1 libgc.1.dylib`GC_push_all_stacks.cold.1 + 25
frame #4: 0x00000001088e64ff libgc.1.dylib`GC_push_all_stacks + 322
frame #5: 0x00000001088dd60f libgc.1.dylib`GC_mark_some + 689
frame #6: 0x00000001088d5e9f libgc.1.dylib`GC_stopped_mark + 177
frame #7: 0x00000001088d5d49 libgc.1.dylib`GC_try_to_collect_inner + 292
frame #8: 0x00000001088d6d4e libgc.1.dylib`GC_collect_or_expand + 181
frame #9: 0x00000001088dbce8 libgc.1.dylib`GC_alloc_large + 206
frame #10: 0x00000001088dc1cf libgc.1.dylib`GC_generic_malloc + 299
frame #11: 0x00000001088dc328 libgc.1.dylib`GC_malloc_kind_global + 219
frame #12: 0x0000000100011f40 hashfs`vcalloc_noscan(n=131072) at builtin.c.v:544:10
frame #13: 0x0000000100012c1a hashfs`__new_array_with_default_noscan(mylen=131072, cap=131072, elm_size=1, val=0x0000000000000000) at array_d_gcboehm_opt.v:21:56
frame #14: 0x000000010005ae9d hashfs`io__new_buffered_reader(o=io__BufferedReaderConfig @ 0x0000000304e78160) at buffered_reader.v:29:103
frame #15: 0x000000010000bc17 hashfs`vweb__handle_conn_T_main__App(conn=0x0000000109432750, app=0x0000000109455800, routes=Map_string_vweb__Route @ 0x0000000304e7bf30) at vweb.v:443:11
frame #16: 0x000000010000bb3c hashfs`vweb__handle_conn_T_main__App_thread_wrapper(arg=0x0000600003000000) at hashfs.tmp.c:6968:2
frame #17: 0x00007ff813d054e1 libsystem_pthread.dylib`_pthread_start + 125
frame #18: 0x00007ff813d00f6b libsystem_pthread.dylib`thread_start + 15
FYI, after switching back to the default gc (no longer using VFLAGS="-d dynamic_boehm"
) the problem seems to have gone away.
Could you verify that #15275 solves the issue, please?
Using latest v source cloned from github today (2022-07-17)
Note: I'm using
VFLAGS: "-d dynamic_boehm"
as a workaround for this: https://github.com/vlang/v/issues/14888 which may be related to these crashes.What did you do?
v run examples/vweb/server_sent_events/server.v
and open three browser windows all with the URLhttp://localhost:8081/
What did you expect to see?
etc.
What did you see instead?
and
and
and sometimes