[GH-ISSUE #1238] --list=cuda-devices: with ASan #780

Closed
opened 2026-10-14 03:23:37 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @loverszhaokai on GitHub (Apr 28, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1238

Originally assigned to: @loverszhaokai on GitHub.

#1. Prepare

$ export ASAN_OPTIONS='abort_on_error=1'
$ CC=clang AFL_USE_ASAN=1 AFL_HARDEN=1 ./configure --enable-asan --enable-memdbg && make -sj8
#2. Reproduce

$ ./john --list=cuda-devices

...
After a long time about one hour
...
CUDA Device #4328731
Name:
Type: integrated
Compute capability: 20.0 (sm_200)
Number of multiprocessors: 32767
Clock rate: 0 Mhz
Memory clock rate (peak) 12506 Mhz
Memory bus width 0 bits
Peak memory bandwidth: 0 GB/s
Total global memory: 16.0 MB
Total shared memory per block: 20.0 B
Total constant memory: 12.0 B
L2 cache size 15.0 EB
Kernel execution timeout: Yes
Concurrent copy and execution: No
Concurrent kernels support: No
Warp size: 32767
Max. GPRs/thread block 1587689520
Max. threads per block 1172321806
Max. resident threads per MP 32673
PCI device topology: feea0ff0:7fa1.1
NVML id: -1
Fan speed: n/a
GPU temp: n/a
Utilization: n/a

==6563==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 12048 byte(s) in 2 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857d34e ()

Direct leak of 136 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f86566fa ()

Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f857a8b2 ()
#2 0x60c00000bf7f ()

Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f857a814 ()

Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f857acb1 ()

Indirect leak of 720 byte(s) in 10 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857977c ()

Indirect leak of 512 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f857d288 ()
#2 0x43314c4374 ()

Indirect leak of 240 byte(s) in 10 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f857978d ()

Indirect leak of 168 byte(s) in 22 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1fcf771d1 in __GI___strndup (/lib64/libc.so.6+0x811d1)

Indirect leak of 141 byte(s) in 5 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1fcf77171 in __GI___strdup (/lib64/libc.so.6+0x81171)

Indirect leak of 96 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f8579810 ()

Indirect leak of 56 byte(s) in 1 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f85797e7 ()

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857d880 ()

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857d8d8 ()

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857d92c ()

Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857dc24 ()

SUMMARY: AddressSanitizer: 14637 byte(s) leaked in 60 allocation(s).

Originally created by @loverszhaokai on GitHub (Apr 28, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1238 Originally assigned to: @loverszhaokai on GitHub. #1. Prepare $ export ASAN_OPTIONS='abort_on_error=1' $ CC=clang AFL_USE_ASAN=1 AFL_HARDEN=1 ./configure --enable-asan --enable-memdbg && make -sj8 #2. Reproduce $ ./john --list=cuda-devices ... After a long time about one hour ... CUDA Device #4328731 Name: Type: integrated Compute capability: 20.0 (sm_200) Number of multiprocessors: 32767 Clock rate: 0 Mhz Memory clock rate (peak) 12506 Mhz Memory bus width 0 bits Peak memory bandwidth: 0 GB/s Total global memory: 16.0 MB Total shared memory per block: 20.0 B Total constant memory: 12.0 B L2 cache size 15.0 EB Kernel execution timeout: Yes Concurrent copy and execution: No Concurrent kernels support: No Warp size: 32767 Max. GPRs/thread block 1587689520 Max. threads per block 1172321806 Max. resident threads per MP 32673 PCI device topology: feea0ff0:7fa1.1 NVML id: -1 Fan speed: n/a GPU temp: n/a Utilization: n/a # ==6563==ERROR: LeakSanitizer: detected memory leaks Direct leak of 12048 byte(s) in 2 object(s) allocated from: #0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56 #1 0x7fa1f857d34e (<unknown module>) Direct leak of 136 byte(s) in 1 object(s) allocated from: #0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40 #1 0x7fa1f86566fa (<unknown module>) Direct leak of 128 byte(s) in 1 object(s) allocated from: #0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40 #1 0x7fa1f857a8b2 (<unknown module>) #2 0x60c00000bf7f (<unknown module>) Direct leak of 128 byte(s) in 1 object(s) allocated from: #0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40 #1 0x7fa1f857a814 (<unknown module>) Direct leak of 128 byte(s) in 1 object(s) allocated from: #0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40 #1 0x7fa1f857acb1 (<unknown module>) Indirect leak of 720 byte(s) in 10 object(s) allocated from: #0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56 #1 0x7fa1f857977c (<unknown module>) Indirect leak of 512 byte(s) in 1 object(s) allocated from: #0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40 #1 0x7fa1f857d288 (<unknown module>) #2 0x43314c4374 (<unknown module>) Indirect leak of 240 byte(s) in 10 object(s) allocated from: #0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40 #1 0x7fa1f857978d (<unknown module>) Indirect leak of 168 byte(s) in 22 object(s) allocated from: #0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40 #1 0x7fa1fcf771d1 in __GI___strndup (/lib64/libc.so.6+0x811d1) Indirect leak of 141 byte(s) in 5 object(s) allocated from: #0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40 #1 0x7fa1fcf77171 in __GI___strdup (/lib64/libc.so.6+0x81171) Indirect leak of 96 byte(s) in 1 object(s) allocated from: #0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40 #1 0x7fa1f8579810 (<unknown module>) Indirect leak of 56 byte(s) in 1 object(s) allocated from: #0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56 #1 0x7fa1f85797e7 (<unknown module>) Indirect leak of 40 byte(s) in 1 object(s) allocated from: #0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56 #1 0x7fa1f857d880 (<unknown module>) Indirect leak of 40 byte(s) in 1 object(s) allocated from: #0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56 #1 0x7fa1f857d8d8 (<unknown module>) Indirect leak of 40 byte(s) in 1 object(s) allocated from: #0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56 #1 0x7fa1f857d92c (<unknown module>) Indirect leak of 16 byte(s) in 1 object(s) allocated from: #0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56 #1 0x7fa1f857dc24 (<unknown module>) SUMMARY: AddressSanitizer: 14637 byte(s) leaked in 60 allocation(s).
bsakaguchi 2026-10-14 03:23:37 +07:00
Author
Owner

@frank-dittrich commented on GitHub (Apr 28, 2015):

You actually waited for 1 hour?

Looks like ASan is broken for CUDA.
There's no reference to john's code, all leaks apparently originated from within ASan.

Is this on well?

<!-- gh-comment-id:97048071 --> @frank-dittrich commented on GitHub (Apr 28, 2015): You actually waited for 1 hour? Looks like ASan is broken for CUDA. There's no reference to john's code, all leaks apparently originated from within ASan. Is this on well?
Author
Owner

@loverszhaokai commented on GitHub (Apr 28, 2015):

@frank-dittrich

You actually waited for 1 hour?

Almost one hour I think.

Is this on well?

It's on the super.

<!-- gh-comment-id:97048476 --> @loverszhaokai commented on GitHub (Apr 28, 2015): @frank-dittrich > You actually waited for 1 hour? Almost one hour I think. > Is this on well? It's on the super.
Author
Owner

@frank-dittrich commented on GitHub (Apr 28, 2015):

I see that you currently run

../john --nolog --skip-self-test --max-run-time=1 --list=cuda-devices --input-encoding=ISO-8859-7

on super.
Interesting combination of options ;)

<!-- gh-comment-id:97048524 --> @frank-dittrich commented on GitHub (Apr 28, 2015): I see that you currently run ``` ../john --nolog --skip-self-test --max-run-time=1 --list=cuda-devices --input-encoding=ISO-8859-7 ``` on super. Interesting combination of options ;)
Author
Owner

@loverszhaokai commented on GitHub (Apr 28, 2015):

@frank-dittrich

Interesting combination of options ;)

I wrote a simple code which combines all the options. Here is the description:

http://www.openwall.com/lists/john-dev/2015/03/27/5

<!-- gh-comment-id:97049711 --> @loverszhaokai commented on GitHub (Apr 28, 2015): @frank-dittrich > Interesting combination of options ;) I wrote a simple code which combines all the options. Here is the description: http://www.openwall.com/lists/john-dev/2015/03/27/5
Author
Owner

@magnumripper commented on GitHub (Apr 28, 2015):

This is virtually a dupe of #1231, which is IMO an invalid issue (or an issue for ASan, not us).

<!-- gh-comment-id:97171650 --> @magnumripper commented on GitHub (Apr 28, 2015): This is virtually a dupe of #1231, which is IMO an invalid issue (or an issue for ASan, not us).
Author
Owner

@ghost commented on GitHub (Apr 28, 2015):

This is virtually a dupe of #1231, which is IMO an invalid issue (or an issue for ASan, not us).

I agree, If a backtrace points to an OpenCL / CUDA library, you have to try to reproduce it in a regular JtR build (sometimes it is a real bug - see #1037).

Otherwise, It is invalid for JtR.

<!-- gh-comment-id:97245005 --> @ghost commented on GitHub (Apr 28, 2015): > This is virtually a dupe of #1231, which is IMO an invalid issue (or an issue for ASan, not us). I agree, If a backtrace points to an OpenCL / CUDA library, you have to try to reproduce it in a regular JtR build (sometimes it is a real bug - see #1037). Otherwise, It is invalid for JtR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#780
No description provided.