Skip to content
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

glew2.1(linux-egl) and vulkan conflict #224

Open
xiangchenhan opened this issue Mar 28, 2019 · 1 comment
Open

glew2.1(linux-egl) and vulkan conflict #224

xiangchenhan opened this issue Mar 28, 2019 · 1 comment

Comments

@xiangchenhan
Copy link

xiangchenhan commented Mar 28, 2019

I link glew(linux-egl) and vulkan sdk both to an exe, as I need render images and save them using gl or vulkan determined by input param.

When the exe quit. It got a double free error.
It seems that glew(linux-egl) and vulkan sdk both release some same egl objects.

When I link glew alone, the exe quit fine. When I link vulkan sdk alone, the exe also quit fine. When I link both, I got the exception below.

Any suggesitions?

Stack:
*** Error in `./XXXXX': double free or corruption (!prev): 0x0000000001b351c0 ***
/lib64/libc.so.6(+0x7d053)[0x7f446d0b6053]
/lib64/libEGL.so.1(eglReleaseThread+0xca)[0x7f446ce2c97a]
======= Memory map: ========
00400000-00415000 r--p 00000000 fd:01 786457 XXXXX
00415000-0047b000 r-xp 00015000 fd:01 786457 XXXXX
0047b000-0048c000 r--p 0007b000 fd:01 786457 XXXXX
0048d000-0048e000 r--p 0008c000 fd:01 786457 XXXXX
0048e000-0048f000 rw-p 0008d000 fd:01 786457 XXXXX
0048f000-00490000 rw-p 00000000 00:00 0
01b11000-08768000 rw-p 00000000 00:00 0 [heap]
7f4440000000-7f4440021000 rw-p 00000000 00:00 0
7f4440021000-7f4444000000 ---p 00000000 00:00 0
7f4448000000-7f4448021000 rw-p 00000000 00:00 0
7f4448021000-7f444c000000 ---p 00000000 00:00 0
7f444c000000-7f444c021000 rw-p 00000000 00:00 0
7f444c021000-7f4450000000 ---p 00000000 00:00 0
7f4450000000-7f4450021000 rw-p 00000000 00:00 0
7f4450021000-7f4454000000 ---p 00000000 00:00 0
7f44632c6000-7f44632c7000 ---p 00000000 00:00 0
7f44632c7000-7f4463ac7000 rw-p 00000000 00:00 0
7f4463ac7000-7f4463ac8000 ---p 00000000 00:00 0
7f4463ac8000-7f44642c8000 rw-p 00000000 00:00 0
7f44642c8000-7f44642c9000 ---p 00000000 00:00 0
7f44642c9000-7f4464ac9000 rw-p 00000000 00:00 0
7f4464ac9000-7f4464aca000 ---p 00000000 00:00 0
7f4464aca000-7f44652ca000 rw-p 00000000 00:00 0
7f44652ca000-7f4465311000 r-xp 00000000 fd:01 2111951 /usr/lib64/libnvidia-fatbinaryloader.so.418.43
7f4465311000-7f4465511000 ---p 00047000 fd:01 2111951 /usr/lib64/libnvidia-fatbinaryloader.so.418.43
7f4465511000-7f4465513000 rw-p 00047000 fd:01 2111951 /usr/lib64/libnvidia-fatbinaryloader.so.418.43
7f4465513000-7f4465518000 rw-p 00000000 00:00 0
7f4465518000-7f4465571000 r-xp 00000000 fd:01 2111967 /usr/lib64/libnvidia-cbl.so.418.43
7f4465571000-7f4465770000 ---p 00059000 fd:01 2111967 /usr/lib64/libnvidia-cbl.so.418.43
7f4465770000-7f4465772000 rw-p 00058000 fd:01 2111967 /usr/lib64/libnvidia-cbl.so.418.43
7f4465772000-7f4465776000 rw-p 00000000 00:00 0
7f4465776000-7f446615a000 r-xp 00000000 fd:01 2111921 /usr/lib64/libnvidia-glvkspirv.so.418.43
7f446615a000-7f446635a000 ---p 009e4000 fd:01 2111921 /usr/lib64/libnvidia-glvkspirv.so.418.43
7f446635a000-7f446651b000 r--p 009e4000 fd:01 2111921 /usr/lib64/libnvidia-glvkspirv.so.418.43
7f446651b000-7f44666c5000 rw-p 00ba5000 fd:01 2111921 /usr/lib64/libnvidia-glvkspirv.so.418.43
7f44666c5000-7f44666d6000 rw-p 00000000 00:00 0
7f4467255000-7f446726a000 r-xp 00000000 fd:01 2097171 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f446726a000-7f4467469000 ---p 00015000 fd:01 2097171 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f4467469000-7f446746a000 r--p 00014000 fd:01 2097171 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f446746a000-7f446746b000 rw-p 00015000 fd:01 2097171 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f446746b000-7f4468a0e000 r-xp 00000000 fd:01 2111960 /usr/lib64/libnvidia-eglcore.so.418.43
7f4468a0e000-7f4468c0e000 ---p 015a3000 fd:01 2111960 /usr/lib64/libnvidia-eglcore.so.418.43
7f4468c0e000-7f4468f04000 rw-p 015a3000 fd:01 2111960 /usr/lib64/libnvidia-eglcore.so.418.43
7f4468f04000-7f4468f18000 rw-p 00000000 00:00 0
7f4468f18000-7f4468fa9000 r-xp 00000000 fd:01 2111961 /usr/lib64/libnvidia-glsi.so.418.43
7f4468fa9000-7f44691a8000 ---p 00091000 fd:01 2111961 /usr/lib64/libnvidia-glsi.so.418.43
7f44691a8000-7f44691bb000 rw-p 00090000 fd:01 2111961 /usr/lib64/libnvidia-glsi.so.418.43
7f44691bb000-7f44691c3000 rw-p 00000000 00:00 0
7f44691c3000-7f44691ca000 r-xp 00000000 fd:01 2098710 /usr/lib64/librt-2.17.so
7f44691ca000-7f44693c9000 ---p 00007000 fd:01 2098710 /usr/lib64/librt-2.17.so
7f44693c9000-7f44693ca000 r--p 00006000 fd:01 2098710 /usr/lib64/librt-2.17.so
7f44693ca000-7f44693cb000 rw-p 00007000 fd:01 2098710 /usr/lib64/librt-2.17.so
7f44693cb000-7f44694b8000 r-xp 00000000 fd:01 2111962 /usr/lib64/libEGL_nvidia.so.418.43
7f44694b8000-7f44696b8000 ---p 000ed000 fd:01 2111962 /usr/lib64/libEGL_nvidia.so.418.43
7f44696b8000-7f44696f3000 rw-p 000ed000 fd:01 2111962 /usr/lib64/libEGL_nvidia.so.418.43
7f44696f3000-7f44696f8000 rw-p 00000000 00:00 0
7f44696f8000-7f446a90f000 r-xp 00000000 fd:01 2111918 /usr/lib64/libnvidia-glcore.so.418.43
7f446a90f000-7f446a930000 rwxp 01217000 fd:01 2111918 /usr/lib64/libnvidia-glcore.so.418.43
7f446a930000-7f446ae25000 r-xp 01238000 fd:01 2111918 /usr/lib64/libnvidia-glcore.so.418.43
7f446ae25000-7f446b025000 ---p 0172d000 fd:01 2111918 /usr/lib64/libnvidia-glcore.so.418.43
7f446b025000-7f446b34c000 rw-p 0172d000 fd:01 2111918 /usr/lib64/libnvidia-glcore.so.418.43
7f446b34c000-7f446b362000 rw-p 00000000 00:00 0
7f446b362000-7f446b365000 r-xp 00000000 fd:01 2111919 /usr/lib64/libnvidia-tls.so.418.43
7f446b365000-7f446b565000 ---p 00003000 fd:01 2111919 /usr/lib64/libnvidia-tls.so.418.43
7f446b565000-7f446b566000 rw-p 00003000 fd:01 2111919 /usr/lib64/libnvidia-tls.so.418.43
7f446b566000-7f446b630000 r-xp 00000000 fd:01 2111920 /usr/lib64/libGLX_nvidia.so.418.43
7f446b630000-7f446b665000 rwxp 000ca000 fd:01 2111920 /usr/lib64/libGLX_nvidia.so.418.43
7f446b665000-7f446b679000 r-xp 000ff000 fd:01 2111920 /usr/lib64/libGLX_nvidia.so.418.43
7f446b679000-7f446b878000 ---p 00113000 fd:01 2111920 /usr/lib64/libGLX_nvidia.so.418.43
7f446b878000-7f446b89d000 rw-p 00112000 fd:01 2111920 /usr/lib64/libGLX_nvidia.so.418.43
7f446b89d000-7f446b8a5000 rw-p 00000000 00:00 0
7f446b8a5000-7f446b8a7000 r-xp 00000000 fd:01 2103798 /usr/lib64/libXau.so.6.0.0
7f446b8a7000-7f446baa7000 ---p 00002000 fd:01 2103798 /usr/lib64/libXau.so.6.0.0
7f446baa7000-7f446baa8000 r--p 00002000 fd:01 2103798 /usr/lib64/libXau.so.6.0.0
7f446baa8000-7f446baa9000 rw-p 00003000 fd:01 2103798 /usr/lib64/libXau.so.6.0.0
7f446baa9000-7f446bad0000 r-xp 00000000 fd:01 2103849 /usr/lib64/libxcb.so.1.1.0
7f446bad0000-7f446bccf000 ---p 00027000 fd:01 2103849 /usr/lib64/libxcb.so.1.1.0
7f446bccf000-7f446bcd0000 r--p 00026000 fd:01 2103849 /usr/lib64/libxcb.so.1.1.0
7f446bcd0000-7f446bcd1000 rw-p 00027000 fd:01 2103849 /usr/lib64/libxcb.so.1.1.0
7f446bcd1000-7f446bce2000 r-xp 00000000 fd:01 2115316 /usr/lib64/libXext.so.6.4.0
7f446bce2000-7f446bee1000 ---p 00011000 fd:01 2115316 /usr/lib64/libXext.so.6.4.0
7f446bee1000-7f446bee2000 r--p 00010000 fd:01 2115316 /usr/lib64/libXext.so.6.4.0
7f446bee2000-7f446bee3000 rw-p 00011000 fd:01 2115316 /usr/lib64/libXext.so.6.4.0
7f446bee3000-7f446c01b000 r-xp 00000000 fd:01 2103853 /usr/lib64/libX11.so.6.3.0
7f446c01b000-7f446c21b000 ---p 00138000 fd:01 2103853 /usr/lib64/libX11.so.6.3.0
7f446c21b000-7f446c21c000 r--p 00138000 fd:01 2103853 /usr/lib64/libX11.so.6.3.0
7f446c21c000-7f446c221000 rw-p 00139000 fd:01 2103853 /usr/lib64/libX11.so.6.3.0
7f446c221000-7f446c231000 r-xp 00000000 fd:01 2111926 /usr/lib64/libGLX.so.0
7f446c231000-7f446c430000 ---p 00010000 fd:01 2111926 /usr/lib64/libGLX.so.0
7f446c430000-7f446c431000 rw-p 0000f000 fd:01 2111926 /usr/lib64/libGLX.so.0
7f446c431000-7f446c451000 rw-p 00000000 00:00 0
7f446c451000-7f446c4db000 r-xp 00000000 fd:01 2111925 /usr/lib64/libGLdispatch.so.0
7f446c4db000-7f446c6db000 ---p 0008a000 fd:01 2111925 /usr/lib64/libGLdispatch.so.0
7f446c6db000-7f446c704000 rw-p 0008a000 fd:01 2111925 /usr/lib64/libGLdispatch.so.0
7f446c704000-7f446c724000 rw-p 00000000 00:00 0
7f446c724000-7f446c727000 r-xp 00000000 fd:01 2098686 /usr/lib64/libdl-2.17.so
7f446c727000-7f446c926000 ---p 00003000 fd:01 2098686 /usr/lib64/libdl-2.17.so
7f446c926000-7f446c927000 r--p 00002000 fd:01 2098686 /usr/lib64/libdl-2.17.so
7f446c927000-7f446c928000 rw-p 00003000 fd:01 2098686 /usr/lib64/libdl-2.17.so
7f446c928000-7f446c9b6000 r-xp 00000000 fd:01 2111927 /usr/lib64/libGL.so.1.7.0
7f446c9b6000-7f446cbb5000 ---p 0008e000 fd:01 2111927 /usr/lib64/libGL.so.1.7.0
7f446cbb5000-7f446cbd0000 rw-p 0008d000 fd:01 2111927 /usr/lib64/libGL.so.1.7.0
7f446cbd0000-7f446cbd1000 rw-p 00000000 00:00 0
7f446cbd1000-7f446cc24000 r-xp 00000000 fd:01 2115387 /usr/lib64/libvulkan.so.1.1.73
7f446cc24000-7f446ce23000 ---p 00053000 fd:01 2115387 /usr/lib64/libvulkan.so.1.1.73
7f446ce23000-7f446ce26000 r--p 00052000 fd:01 2115387 /usr/lib64/libvulkan.so.1.1.73
7f446ce26000-7f446ce27000 rw-p 00055000 fd:01 2115387 /usr/lib64/libvulkan.so.1.1.73
7f446ce27000-7f446ce38000 r-xp 00000000 fd:01 2111928 /usr/lib64/libEGL.so.1.1.0
7f446ce38000-7f446d038000 ---p 00011000 fd:01 2111928 /usr/lib64/libEGL.so.1.1.0
7f446d038000-7f446d039000 rw-p 00011000 fd:01 2111928 /usr/lib64/libEGL.so.1.1.0
7f446d039000-7f446d1f0000 r-xp 00000000 fd:01 2098680 /usr/lib64/libc-2.17.so
7f446d1f0000-7f446d3f0000 ---p 001b7000 fd:01 2098680 /usr/lib64/libc-2.17.so
7f446d3f0000-7f446d3f4000 r--p 001b7000 fd:01 2098680 /usr/lib64/libc-2.17.so
7f446d3f4000-7f446d3f6000 rw-p 001bb000 fd:01 2098680 /usr/lib64/libc-2.17.so
7f446d3f6000-7f446d3fb000 rw-p 00000000 00:00 0
7f446d3fb000-7f446d411000 r-xp 00000000 fd:01 2098706 /usr/lib64/libpthread-2.17.so
7f446d411000-7f446d611000 ---p 00016000 fd:01 2098706 /usr/lib64/libpthread-2.17.so
7f446d611000-7f446d612000 r--p 00016000 fd:01 2098706 /usr/lib64/libpthread-2.17.so
7f446d612000-7f446d613000 rw-p 00017000 fd:01 2098706 /usr/lib64/libpthread-2.17.so
7f446d613000-7f446d617000 rw-p 00000000 00:00 0
7f446d617000-7f446d62d000 r-xp 00000000 fd:01 2099783 /usr/lib64/libgomp.so.1.0.0
7f446d62d000-7f446d82c000 ---p 00016000 fd:01 2099783 /usr/lib64/libgomp.so.1.0.0
7f446d82c000-7f446d82d000 r--p 00015000 fd:01 2099783 /usr/lib64/libgomp.so.1.0.0
7f446d82d000-7f446d82e000 rw-p 00016000 fd:01 2099783 /usr/lib64/libgomp.so.1.0.0
7f446d82e000-7f446d92f000 r-xp 00000000 fd:01 2098688 /usr/lib64/libm-2.17.so
7f446d92f000-7f446db2e000 ---p 00101000 fd:01 2098688 /usr/lib64/libm-2.17.so
7f446db2e000-7f446db2f000 r--p 00100000 fd:01 2098688 /usr/lib64/libm-2.17.so
7f446db2f000-7f446db30000 rw-p 00101000 fd:01 2098688 /usr/lib64/libm-2.17.so
7f446db30000-7f446db45000 r-xp 00000000 fd:01 2099113 /usr/lib64/libz.so.1.2.7
7f446db45000-7f446dd44000 ---p 00015000 fd:01 2099113 /usr/lib64/libz.so.1.2.7
7f446dd44000-7f446dd45000 r--p 00014000 fd:01 2099113 /usr/lib64/libz.so.1.2.7
7f446dd45000-7f446dd46000 rw-p 00015000 fd:01 2099113 /usr/lib64/libz.so.1.2.7
7f446dd46000-7f446dfef000 r--p 00000000 fd:01 4064168 XXXXX
7f446dfef000-7f446e581000 r-xp 002a9000 fd:01 4064168 XXXXX
7f446e581000-7f446e70b000 r--p 0083b000 fd:01 4064168 XXXXX
7f446e70b000-7f446e70c000 ---p 009c5000 fd:01 4064168 XXXXX
7f446e70c000-7f446e72b000 r--p 009c5000 fd:01 4064168 XXXXX
7f446e72b000-7f446e73e000 rw-p 009e4000 fd:01 4064168 XXXXX
7f446e73e000-7f446e77a000 rw-p 00000000 00:00 0
7f446e77a000-7f446e79b000 r-xp 00000000 fd:01 2098673 /usr/lib64/ld-2.17.so
7f446e8c4000-7f446e8dc000 rw-p 00000000 00:00 0
7f446e8dc000-7f446e932000 r--p 00000000 fd:01 2115409 /usr/lib64/libGLEW.so.2.1.0
7f446e932000-7f446e96f000 r-xp 00056000 fd:01 2115409 /usr/lib64/libGLEW.so.2.1.0
7f446e96f000-7f446e986000 r--p 00093000 fd:01 2115409 /usr/lib64/libGLEW.so.2.1.0
7f446e986000-7f446e987000 ---p 000aa000 fd:01 2115409 /usr/lib64/libGLEW.so.2.1.0
7f446e987000-7f446e992000 r--p 000aa000 fd:01 2115409 /usr/lib64/libGLEW.so.2.1.0
7f446e992000-7f446e993000 rw-p 000b5000 fd:01 2115409 /usr/lib64/libGLEW.so.2.1.0
7f446e993000-7f446e99b000 rw-p 00000000 00:00 0
7f446e99b000-7f446e99c000 r--p 00021000 fd:01 2098673 /usr/lib64/ld-2.17.so
7f446e99c000-7f446e99d000 rw-p 00022000 fd:01 2098673 /usr/lib64/ld-2.17.so
7f446e99d000-7f446e99e000 rw-p 00000000 00:00 0
7fffa499b000-7fffa49bc000 rw-p 00000000 00:00 0 [stack]
7fffa49c9000-7fffa49cb000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

@xiangchenhan xiangchenhan changed the title glew and vulkan conflict glew2.1(linux-egl) and vulkan conflict Mar 28, 2019
@nigels-com
Copy link
Owner

I don't recall GLEW cleaning up EGL objects at all, that is rightly the responsibility of the application (or other libraries). Perhaps valgrind can shed some light on things?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants