-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
ztest: seg fault __deallocate_stack after pthread_join() #5523
Comments
Here is another one not sure if it is related: [Thread debugging using libthread_db enabled]
#0 0x00007f3a98607e61 in pthread_join () from /lib64/libpthread.so.0 Thread 757 (Thread 0x7f3a62187700 (LWP 116952)): |
* Simplify threads, mutexs, cvs and rwlocks * Update the zk_thread_create() function to use the same trick as Illumos. Specifically, cast the new pthread_t to a void pointer and return that as the kthread_t *. This avoids the issues associated with managing a wrapper structure and is safe as long as the callers never attempt to dereference it. * Update all function prototypes passed to pthread_create() to match the expected prototype. We were getting away this with before since the function were explicitly cast. * Replaced direct zk_thread_create() calls with thread_create() for code consistency. All consumers of libzpool now use the proper wrappers. * The mutex_held() calls were converted to MUTEX_HELD(). * Removed all mutex_owner() calls and retired the interface. Instead use MUTEX_HELD() which provides the same information and allows the implementation details to be hidden. In this case the use of the pthread_equals() function. * The kthread_t, kmutex_t, krwlock_t, and krwlock_t types had any non essential fields removed. In the case of kthread_t and kcondvar_t they could be directly typedef'd to pthread_t and pthread_cond_t respectively. * Removed all extra ASSERTS from the thread, mutex, rwlock, and cv wrapper functions. In practice, pthreads already provides the vast majority of checks as long as we check the return code. Removing this code from our wrappers help readability. * Added TS_JOINABLE state flag to pass to request a joinable rather than detached thread. This isn't a standard thread_create() state but it's the least invasive way to pass this information and is only used by ztest. TEST_ZTEST_TIMEOUT=3600 Chunwei Chen <tuxoko@gmail.com> Reviewed-by: Tom Caputi <tcaputi@datto.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#4547 Closes openzfs#5503 Closes openzfs#5523 Closes openzfs#6377 Closes openzfs#6495
Version Information
Distribution Name Centos 7.2
Distribution Version 7.2
Linux Kernel 3.10.0-327.36.3.el7.x86_64
Architecture x86_64
ZFS Version master Dec 20th RPM/modinfo say: 0.7.0-rc2
SPL Version master Dec 20th RPM/modinfo say: 0.7.0-rc2
Git Build Data Revision: a3823f4
refs/remotes/origin/master
Built Branches refs/remotes/origin/master: Build #186 of Revision a3823f4 (refs/remotes/origin/master)
Problem
Running zloop we hit an issue:
/usr/sbin/ztest[0x40a7cf]
/lib64/libpthread.so.0(+0xf100)[0x7f24ff29d100]
/lib64/libpthread.so.0(+0x6e78)[0x7f24ff294e78]
/lib64/libpthread.so.0(pthread_join+0xe3)[0x7f24ff296f33]
/lib64/libzpool.so.2(zk_thread_join+0x21)[0x7f25004924b1]
Reproduce
/sbin/ztest -VVVVV -m 1 -r 0 -R 1 -v 5 -a 12 -T 4 -P 10 -s 128m -f /var/tmp
Log detail
ztest.out
status
The text was updated successfully, but these errors were encountered: