[ https://issues.apache.org/jira/browse/ZOOKEEPER-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mate Szalay-Beko resolved ZOOKEEPER-3885. ----------------------------------------- Fix Version/s: 3.7.0 3.5.9 3.6.2 Resolution: Fixed Issue resolved by pull request 1403 [https://github.com/apache/zookeeper/pull/1403] > zoo_aremove_watches segfault: zk_hashtable needs locking! > --------------------------------------------------------- > > Key: ZOOKEEPER-3885 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3885 > Project: ZooKeeper > Issue Type: Bug > Components: c client > Affects Versions: 3.6.1, 3.5.8 > Reporter: Tudor Bosman > Priority: Major > Fix For: 3.6.2, 3.5.9, 3.7.0 > > Time Spent: 1h 10m > Remaining Estimate: 0h > > We're encountering the following segfault (stack abridged). > This happens because the watcher hashtable has no locking, and is accessed > concurrently from multiple threads: > - the thread doing zoo_aremove_watches, and > - the IO thread adding / firing watchers > We encountered this with zookeeper 3.5.8, but by code inspection the code > appears the same in 3.6. > *** Aborted at 1594473472 (Unix time, try 'date -d @1594473472') *** > *** Signal 11 (SIGSEGV) (0xae000000aa) received by PID 199 (pthread TID > 0x7f1d64667700) (linux TID 1273) (code: address not mapped to object), stack > trace: *** > @ 00007f1d98dfc8b3 folly::symbolizer::(anonymous > namespace)::signalHandler(int, siginfo_t*, void*) > > /src/folly/folly/experimental/symbolizer/SignalHandler.cpp:431 > @ 00007f1d95e6c89f (unknown) > @ 00007f1d8f73de1e containsWatcher.part.3 > > /src/zookeeper/zookeeper-client/zookeeper-client-c/src/zk_hashtable.c:152 > @ 00007f1d8f73e806 pathHasWatcher > > /src/zookeeper/zookeeper-client/zookeeper-client-c/src/zk_hashtable.c:456 > @ 00007f1d8f7382dd aremove_watches > > /src/zookeeper/zookeeper-client/zookeeper-client-c/src/zookeeper.c:4260 > @ 00007f1d8f738f82 zoo_aremove_watches > > /src/zookeeper/zookeeper-client/zookeeper-client-c/src/zookeeper.c:5131 -- This message was sent by Atlassian Jira (v8.3.4#803005)