Trying to run Nashorn's "ant test262parallel" fails with a malloc related crash. It is non-deterministic as to when in the execution it happens, but it happens every time.
Steps to reproduce with a copy of jdk9:
cd jdk9/nashorn/make
ant get-testng get-test262
ant test262parallel
"ant get-testng get-test262" only needs to be run once to download external dependencies; "ant test262parallel" can then be run any number of times to exhibit the issue.
Sample error message:
[java] java(50094,0x11ec11000) malloc: *** error for object 0x7fbef1fa5320: pointer being freed was not allocated
[java] *** set a breakpoint in malloc_error_break to debug
[java] Java Result: 134
Crashed thread for above message:
Thread 5 Crashed:: Java: GC Thread#1
0 libsystem_kernel.dylib 0x00007fff8eff0286 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff8ba899b3 abort + 129
2 libsystem_malloc.dylib 0x00007fff822991cb free + 428
3 libjvm.dylib 0x000000010b11a40f nmethodBucket::clean_dependent_nmethods(nmethodBucket*) + 59
4 libjvm.dylib 0x000000010b2b5feb MethodHandles::remove_dependent_nmethod(oopDesc*, nmethod*) + 55
5 libjvm.dylib 0x000000010b2ca188 nmethod::flush_dependencies(BoolObjectClosure*) + 120
6 libjvm.dylib 0x000000010b2c9f91 nmethod::make_unloaded(BoolObjectClosure*, oopDesc*) + 29
7 libjvm.dylib 0x000000010b2caaef nmethod::unload_if_dead_at(RelocIterator*, BoolObjectClosure*, bool) + 123
8 libjvm.dylib 0x000000010b2cabfa nmethod::do_unloading_parallel(BoolObjectClosure*, bool) + 262
9 libjvm.dylib 0x000000010b0a63d2 G1CodeCacheUnloadingTask::clean_nmethod(nmethod*) + 28
10 libjvm.dylib 0x000000010b0a6159 G1CodeCacheUnloadingTask::work_first_pass(unsigned int) + 129
11 libjvm.dylib 0x000000010b0a6099 G1ParallelCleaningTask::work(unsigned int) + 27
12 libjvm.dylib 0x000000010b42e126 GangWorker::loop() + 36
13 libjvm.dylib 0x000000010b2dfcd8 java_start(Thread*) + 240
14 libsystem_pthread.dylib 0x00007fff8d15a05a _pthread_body + 131
15 libsystem_pthread.dylib 0x00007fff8d159fd7 _pthread_start + 176
16 libsystem_pthread.dylib 0x00007fff8d1573ed thread_start + 13
Different sample error message:
[java] java(50148,0x11b969000) malloc: *** error for object 0x7f8f7023c0c0: double free
[java] *** set a breakpoint in malloc_error_break to debug
[java] Java Result: 134
Steps to reproduce with a copy of jdk9:
cd jdk9/nashorn/make
ant get-testng get-test262
ant test262parallel
"ant get-testng get-test262" only needs to be run once to download external dependencies; "ant test262parallel" can then be run any number of times to exhibit the issue.
Sample error message:
[java] java(50094,0x11ec11000) malloc: *** error for object 0x7fbef1fa5320: pointer being freed was not allocated
[java] *** set a breakpoint in malloc_error_break to debug
[java] Java Result: 134
Crashed thread for above message:
Thread 5 Crashed:: Java: GC Thread#1
0 libsystem_kernel.dylib 0x00007fff8eff0286 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff8ba899b3 abort + 129
2 libsystem_malloc.dylib 0x00007fff822991cb free + 428
3 libjvm.dylib 0x000000010b11a40f nmethodBucket::clean_dependent_nmethods(nmethodBucket*) + 59
4 libjvm.dylib 0x000000010b2b5feb MethodHandles::remove_dependent_nmethod(oopDesc*, nmethod*) + 55
5 libjvm.dylib 0x000000010b2ca188 nmethod::flush_dependencies(BoolObjectClosure*) + 120
6 libjvm.dylib 0x000000010b2c9f91 nmethod::make_unloaded(BoolObjectClosure*, oopDesc*) + 29
7 libjvm.dylib 0x000000010b2caaef nmethod::unload_if_dead_at(RelocIterator*, BoolObjectClosure*, bool) + 123
8 libjvm.dylib 0x000000010b2cabfa nmethod::do_unloading_parallel(BoolObjectClosure*, bool) + 262
9 libjvm.dylib 0x000000010b0a63d2 G1CodeCacheUnloadingTask::clean_nmethod(nmethod*) + 28
10 libjvm.dylib 0x000000010b0a6159 G1CodeCacheUnloadingTask::work_first_pass(unsigned int) + 129
11 libjvm.dylib 0x000000010b0a6099 G1ParallelCleaningTask::work(unsigned int) + 27
12 libjvm.dylib 0x000000010b42e126 GangWorker::loop() + 36
13 libjvm.dylib 0x000000010b2dfcd8 java_start(Thread*) + 240
14 libsystem_pthread.dylib 0x00007fff8d15a05a _pthread_body + 131
15 libsystem_pthread.dylib 0x00007fff8d159fd7 _pthread_start + 176
16 libsystem_pthread.dylib 0x00007fff8d1573ed thread_start + 13
Different sample error message:
[java] java(50148,0x11b969000) malloc: *** error for object 0x7f8f7023c0c0: double free
[java] *** set a breakpoint in malloc_error_break to debug
[java] Java Result: 134
- duplicates
-
JDK-8139595 MethodHandles::remove_dependent_nmethod is not MT safe
-
- Closed
-
-
JDK-8139595 MethodHandles::remove_dependent_nmethod is not MT safe
-
- Closed
-