Re: [tor-dev] [Win32] crash in test/bench.exe
isis agora lovecruft wrote: Thanks for the bug report and the patch! I've made #25479 [0] for this. Can I ask what version of Windows you were running the benchmarks on? Windows-10 (v1701). 64-bit. It seems like it might possibly have been due to differences in behaviours between various Windows flavours in the InitializeCriticalSection() function [1] (which was being called from tor_mutex_init(), itself called from init_logging())? I don't think 'init_logging()' is calling 'atomic_counter_init()' with the correct AC, but maybe an unrelated mutex. Hence the crash. Calling 'init_protocol_warning_severity_level()' initialises the correct (and needed) AC 'protocol_warning_severity_level'. -- --gv ___ tor-dev mailing list tor-dev@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev
Re: [tor-dev] [Win32] crash in test/bench.exe
Gisle Vanem transcribed 1.0K bytes: > I wrote: > > >Seems bench.c uses some mutex which is not initialised > >with 'tor_mutex_init()'. I fail to see which that should > >be. > > With this patch, I no longer get that crash: > > --- a/bench.c 2018-01-25 20:15:13 > +++ b/bench.c 2018-03-13 12:38:09 > @@ -713,6 +713,8 @@ > printf("Couldn't seed RNG; exiting.\n"); > return 1; >} > + > + init_protocol_warning_severity_level(); >crypto_init_siphash_key(); >options = options_new(); >init_logging(1); > > > > But a bit crude. IMHO bench.c shouldn't have to care about such details > like mutex'es and atomic counters. Hello Gisle, Thanks for the bug report and the patch! I've made #25479 [0] for this. Can I ask what version of Windows you were running the benchmarks on? It seems like it might possibly have been due to differences in behaviours between various Windows flavours in the InitializeCriticalSection() function [1] (which was being called from tor_mutex_init(), itself called from init_logging())? [0]: https://trac.torproject.org/projects/tor/ticket/25479 [1]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683472(v=vs.85).aspx) Best regards, -- ♥Ⓐ isis agora lovecruft _ OpenPGP: 4096R/0A6A58A14B5946ABDE18E207A3ADB67A2CDB8B35 Current Keys: https://fyb.patternsinthevoid.net/isis.txt signature.asc Description: Digital signature ___ tor-dev mailing list tor-dev@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev
Re: [tor-dev] [Win32] crash in test/bench.exe
I wrote: Seems bench.c uses some mutex which is not initialised with 'tor_mutex_init()'. I fail to see which that should be. With this patch, I no longer get that crash: --- a/bench.c 2018-01-25 20:15:13 +++ b/bench.c 2018-03-13 12:38:09 @@ -713,6 +713,8 @@ printf("Couldn't seed RNG; exiting.\n"); return 1; } + + init_protocol_warning_severity_level(); crypto_init_siphash_key(); options = options_new(); init_logging(1); But a bit crude. IMHO bench.c shouldn't have to care about such details like mutex'es and atomic counters. -- --gv ___ tor-dev mailing list tor-dev@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev