PCSX2 hang on exit (Linux)...
#1
Version : 1.3.1-20151205020727 (git)
------------------------------------------------

First I will give some details on how I compiled the latest version:

I compile using Fedora 23 (32bit) on a virtual machine.

Use the following compile options:

./build.sh --clean --release --gtk3 -DSDL2_API=FALSE

I run the application on Fedora 23 (64bit).

Everything works fine and I can load games as normal. The problem comes when I come to close the program. The window appears to hang on exit. If I look at the terminal output I get the following:


Code:
Decommitting host memory for virtual systems...
Releasing host memory maps for virtual systems...


It gets no further and I have to force close the application.

The last time I built PCSX2 was about 2 months ago and I had no troubles then.
Reply

Sponsored links

#2
Replace release by dev. Retry and attach gdb into the process. Dump all backtrace with this command "thread apply all bt"
Reply
#3
I tried the following command:

gdb PCSX2 (followed by run)

The application runs and when I try to exit I get the following:


Code:
Starting program: /home/toxicshadow/Desktop/debug/bin/PCSX2
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.22-5.fc23.i686
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Interface is initializing.  Entering Pcsx2App::OnInit!
Applying operating system default language...
Command line parsing...
Command line parsed!
[New Thread 0xf187db40 (LWP 11686)]
(UserMode) Found portable install ini @ /home/toxicshadow/Desktop/debug/bin/portable.ini
[New Thread 0xf0effb40 (LWP 11687)]
[New Thread 0xf04ffb40 (LWP 11688)]
Detaching after fork from child process 11690.
[New Thread 0xefaffb40 (LWP 11692)]
[New Thread 0xef0ffb40 (LWP 11693)]
[Thread 0xef0ffb40 (LWP 11693) exited]
[Thread 0xf187db40 (LWP 11686) exited]
Releasing host memory maps for virtual systems...
[Thread 0xf04ffb40 (LWP 11688) exited]
[Thread 0xf0effb40 (LWP 11687) exited]
[Thread 0xefaffb40 (LWP 11692) exited]
[Inferior 1 (process 11682) exited normally]
Missing separate debuginfos, use: dnf debuginfo-install alsa-lib-1.0.29-2.fc23.i686 atk-2.18.0-1.fc23.i686 at-spi2-atk-2.18.1-1.fc23.i686 at-spi2-core-2.18.3-1.fc23.i686 bzip2-libs-1.0.6-17.fc23.i686 cairo-1.14.2-2.fc23.i686 cairo-gobject-1.14.2-2.fc23.i686 dbus-libs-1.10.6-1.fc23.i686 elfutils-libelf-0.163-4.fc23.i686 elfutils-libs-0.163-4.fc23.i686 expat-2.1.0-12.fc23.i686 fontconfig-2.11.94-4.fc23.i686 freetype-2.6.0-3.fc23.i686 gdk-pixbuf2-2.32.2-1.fc23.i686 glib2-2.46.2-1.fc23.i686 graphite2-1.2.4-5.fc23.i686 gtk3-3.18.5-3.fc23.i686 harfbuzz-1.0.6-1.fc23.i686 jack-audio-connection-kit-1.9.10-3.fc23.i686 jbigkit-libs-2.1-4.fc23.i686 libaio-0.3.110-5.fc23.i686 libattr-2.4.47-14.fc23.i686 libcap-2.24-8.fc23.i686 libdatrie-0.2.8-6.fc23.i686 libdrm-2.4.65-1.fc23.i686 libepoxy-1.2-4.fc23.i686 libffi-3.1-8.fc23.i686 libgcc-5.1.1-4.fc23.i686 libgcrypt-1.6.4-1.fc23.i686 libgpg-error-1.20-1.fc23.i686 libICE-1.0.9-3.fc23.i686 libjpeg-turbo-1.4.1-2.fc23.i686 libpng-1.6.19-1.fc23.i686 libselinux-2.4-4.fc23.i686 libSM-1.2.2-3.fc23.i686 libstdc++-5.1.1-4.fc23.i686 libthai-0.1.21-2.fc23.i686 libtiff-4.0.4-1.fc23.i686 libuuid-2.27.1-2.fc23.i686 libwayland-client-1.9.0-1.fc23.i686 libwayland-cursor-1.9.0-1.fc23.i686 libwayland-server-1.9.0-1.fc23.i686 libX11-1.6.3-2.fc23.i686 libXau-1.0.8-5.fc23.i686 libxcb-1.11.1-1.fc23.i686 libXcomposite-0.4.4-7.fc23.i686 libXcursor-1.1.14-4.fc23.i686 libXdamage-1.1.4-7.fc23.i686 libXext-1.3.3-3.fc23.i686 libXfixes-5.0.1-5.fc23.i686 libXi-1.7.4-3.fc23.i686 libXinerama-1.1.3-5.fc23.i686 libxkbcommon-0.5.0-2.fc23.i686 libXrandr-1.5.0-2.fc23.i686 libXrender-0.9.9-2.fc23.i686 libXxf86vm-1.1.4-2.fc23.i686 mesa-libEGL-11.0.6-1.20151122.fc23.i686 mesa-libgbm-11.0.6-1.20151122.fc23.i686 mesa-libGLU-9.0.0-9.fc23.i686 mesa-libwayland-egl-11.0.6-1.20151122.fc23.i686 opus-1.1.1-1.fc23.i686 pango-1.38.1-1.fc23.i686 pcre-8.38-3.fc23.i686 pixman-0.33.4-1.fc23.i686 portaudio-19-22.fc23.i686 SDL-1.2.15-20.fc23.i686 soundtouch-1.4.0-13.fc23.i686 systemd-libs-222-8.fc23.i686 wxBase3-3.0.2-11.fc23.i686 wxGTK3-3.0.2-11.fc23.i686 xz-libs-5.2.1-3.fc23.i686 zlib-1.2.8-9.fc23.i686

So I ran the dnf debuginfo-install ............... line and it installed about 1.8 gigs worth of debug info but for some reason, the next time I run GDB it still gives me the same response asking me to install the debug info?

I know it is definately installed because if i try to run the dnf command again it says it is already installed?

Is it because I am trying to debug a 32bit binary on a 64bit version of GDB?

Unfortunately I have to go out now and wont be able to try anything until tomorrow. If you could leave some instructions I will get back to you as soon as I can.

Thanks.
Reply
#4
you need a PCSX2 devbuild to get debug symbol.

And just run the above gdb command (my first post)
Reply
#5
Ok so I have had no luck getting GDB to show anything. I have attached the output so you can see that the build type is set to devel

Code:
Doing a clean build.
Forcing cross compilation.
Building pcsx2 with -DCMAKE_BUILD_PO=FALSE -DCMAKE_BUILD_TYPE=Devel -DGTK3_API=TRUE -DSDL2_API=FALSE -DCMAKE_TOOLCHAIN_FILE=cmake/linux-compiler-i386-multilib.cmake
-- The C compiler identification is GNU 5.1.1
-- The CXX compiler identification is GNU 5.1.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build Fedora specific
-- Cross compilation is enabled.
-- Compiling a i386 build on a x86_64 host.
-- Found ALSA: /usr/lib/libasound.so (found version "1.0.29")
-- Found Gettext: /usr/bin/msgmerge (found version "0.19.6")
-- Found Git: /usr/bin/git (found version "2.5.0")
-- Looking for lzma_auto_decoder in /usr/lib/liblzma.so
-- Looking for lzma_auto_decoder in /usr/lib/liblzma.so - found
-- Looking for lzma_easy_encoder in /usr/lib/liblzma.so
-- Looking for lzma_easy_encoder in /usr/lib/liblzma.so - found
-- Looking for lzma_lzma_preset in /usr/lib/liblzma.so
-- Looking for lzma_lzma_preset in /usr/lib/liblzma.so - found
-- Found LibLZMA: /usr/include (found version "5.2.1")
-- Found OpenGL: /usr/lib/libGL.so  
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.8")
-- Found PNG: /usr/lib/libpng.so (found version "1.6.19")
-- Found wxWidgets: TRUE  
-- Found Libc: /usr/lib/librt.so;/usr/lib/libdl.so;/usr/lib/libm.so  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
-- AIO found
-- PORTAUDIO found
-- SOUNDTOUCH found
-- PNGPP not found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found SDL: /usr/lib/libSDL.so (found version "1.2.15")
-- Looking for XOpenDisplay in /usr/lib/libX11.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Found X11: /usr/lib/libX11.so
-- Found GTK3_GTK: /usr/lib/libgtk-3.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/games/native_emulators/source_files/pcsx2/build

I run the following command "gdb PCSX2"
followed by "run"
I then close the PCSX2 application
I run the following command (still within GDB) "thread apply all bt"
Nothing happens apart from the GDB prompt re-appearing again
I try running "bt"
I get the following response "No Stack"

I dont know if it is the effect of gdb but it almost appears that the hang does not happen when launching via gdb. If I launch without gdb, when i close the program the main window closes but the "PCSX2 Program Log" window remains open and it appears to hang (I have left it for a long time to prove that it never closes).

Launching via gdb does not cause the "PCSX2 Program Log" window to remain.....

Maybe the reason there is no call stack is because the program doesn't crash?

On the plus side, I have discovered that I dont need the virtual machine to build it anymore as the 32bit dependencies no longer conflict with the 64bit versions like they did on older versions of Fedora so now I can build on my 64bit machine Smile
Reply
#6
Do the contrary start/shutdown PCSX2. Attach gdb on the hanging windows. Something like that (check google)
gdb ./bin/PCSX2 `pidof PCSX2`
Reply
#7
That did the job. I learned something new there.

Hopefully this gives some idea of what is going on:


Code:
Thread 4 (Thread 0xf2bf9b40 (LWP 3812)):
#0  0xf7792ba0 in __kernel_vsyscall ()
#1  0xf60168a6 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   at /usr/lib/libpthread.so.0
#2  0xf6016ea9 in pthread_cond_timedwait@GLIBC_2.0 ()
   at /usr/lib/libpthread.so.0
#3  0xf5482054 in  () at /usr/lib/libGL.so.1
#4  0xf446b7df in  () at /usr/lib/libnvidia-glcore.so.358.16
#5  0xf5484458 in  () at /usr/lib/libGL.so.1
#6  0xf6011452 in start_thread () at /usr/lib/libpthread.so.0
#7  0xf5f362de in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0xefaffb40 (LWP 3819)):
#0  0xf7792ba0 in __kernel_vsyscall ()
#1  0xf5f22eeb in read () at /usr/lib/libc.so.6
#2  0xf520b59c in  () at /usr/lib/tls/libnvidia-tls.so.358.16
#3  0x08343811 in LinuxPipeThread::ExecuteTaskInThread() ()
#4  0x0836ab7f in Threading::pxThread::_try_virtual_invoke(void (Threading::pxThread::*)()) ()
#5  0x0836bdf5 in Threading::pxThread::_internal_execute() ()
#6  0x0836bef5 in Threading::pxThread::_internal_callback(void*) ()
#7  0xf6011452 in start_thread () at /usr/lib/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#8  0xf5f362de in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0xee6ffb40 (LWP 3823)):
#0  0xf7792ba0 in __kernel_vsyscall ()
#1  0xf601c5e2 in __libc_do_syscall () at /usr/lib/libpthread.so.0
#2  0xf601892f in do_futex_wait.constprop () at /usr/lib/libpthread.so.0
#3  0xf6018a37 in __new_sem_wait_slow.constprop.1 ()
   at /usr/lib/libpthread.so.0
#4  0x0808cba1 in VU_Thread::ExecuteRingBuffer() ()
#5  0x0808d2cc in  ()
#6  0x0836ab7f in Threading::pxThread::_try_virtual_invoke(void (Threading::pxThread::*)()) ()
#7  0x0836bdf5 in Threading::pxThread::_internal_execute() ()
#8  0x0836bef5 in Threading::pxThread::_internal_callback(void*) ()
#9  0xf6011452 in start_thread () at /usr/lib/libpthread.so.0
#10 0xf5f362de in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0xf2dbda80 (LWP 3811)):
#0  0xf7792ba0 in __kernel_vsyscall ()
#1  0xf60197a2 in __lll_timedlock_wait () at /usr/lib/libpthread.so.0
#2  0xf6013fc6 in pthread_mutex_timedlock () at /usr/lib/libpthread.so.0
#3  0x083596d8 in Threading::Mutex::AcquireWithoutYield(wxTimeSpan const&) ()
#4  0x08359893 in Threading::Mutex::WaitWithoutYield(wxTimeSpan const&) ()
---Type <return> to continue, or q <return> to quit---
#5  0x0836a904 in Threading::pxThread::WaitOnSelf(Threading::Mutex&) const ()
#6  0x0836badb in Threading::pxThread::Cancel(bool) ()
#7  0x08340eff in LinuxPipeRedirection::Cleanup() ()
#8  0x08340fa8 in LinuxPipeRedirection::~LinuxPipeRedirection() ()
#9  0x08340fde in LinuxPipeRedirection::~LinuxPipeRedirection() ()
#10 0x081bd78f in Pcsx2App::~Pcsx2App() ()
#11 0x081bdb9e in Pcsx2App::~Pcsx2App() ()
#12 0xf75b52f1 in wxEntryCleanup() () at /usr/lib/libwx_baseu-3.0.so.0
#13 0xf75b537c in wxUninitialize() () at /usr/lib/libwx_baseu-3.0.so.0
#14 0xf75b6a54 in wxEntry(int&, wchar_t**) () at /usr/lib/libwx_baseu-3.0.so.0
#15 0xf75b6ae7 in wxEntry(int&, char**) () at /usr/lib/libwx_baseu-3.0.so.0
#16 0x081be46f in main ()
Reply
#8
Do a "info thread" maybe it will give the name of the thread. However it could an nvidia driver bug
Reply
#9
Sorry, I just realized that was my release version and not my Dev one.

Here is the Dev output:


Code:
(gdb) thread apply all bt

Thread 3 (Thread 0xf05ffb40 (LWP 8270)):
#0  0xf77acba0 in __kernel_vsyscall ()
#1  0xf5f3ceeb in read () at /usr/lib/libc.so.6
#2  0xf522559c in  () at /usr/lib/tls/libnvidia-tls.so.358.16
#3  0x083543d1 in LinuxPipeThread::ExecuteTaskInThread() (__nbytes=2048, __buf=0xf05fe6af, __fd=<optimized out>) at /usr/include/bits/unistd.h:44
#4  0x083543d1 in LinuxPipeThread::ExecuteTaskInThread() (this=0xbe8e07c)
   at /mnt/games/native_emulators/source_files/pcsx2/pcsx2/Linux/LnxConsolePipe.cpp:54
#5  0x0837e62f in Threading::pxThread::_try_virtual_invoke(void (Threading::pxThread::*)()) (this=0xbe8e07c, method=<optimized out>)
   at /mnt/games/native_emulators/source_files/pcsx2/common/src/Utilities/ThreadTools.cpp:545
#6  0x0837f8cb in Threading::pxThread::_internal_execute() (this=0xbe8e07c)
   at /mnt/games/native_emulators/source_files/pcsx2/common/src/Utilities/ThreadTools.cpp:644
#7  0x0837f9fe in Threading::pxThread::_internal_callback(void*) (itsme=0xbe8e07c)
   at /mnt/games/native_emulators/source_files/pcsx2/common/src/Utilities/ThreadTools.cpp:684
#8  0xf602b452 in start_thread () at /usr/lib/libpthread.so.0
#9  0xf5f502de in clone () at /usr/lib/libc.so.6
---Type <return> to continue, or q <return> to quit---

Thread 2 (Thread 0xef1ffb40 (LWP 8274)):
#0  0xf77acba0 in __kernel_vsyscall ()
#1  0xf60365e2 in __libc_do_syscall () at /usr/lib/libpthread.so.0
#2  0xf603292f in do_futex_wait.constprop () at /usr/lib/libpthread.so.0
#3  0xf6032a37 in __new_sem_wait_slow.constprop.1 () at /usr/lib/libpthread.so.0
#4  0x08379bc0 in Threading::Semaphore::WaitWithoutYield() (this=0x9de01ac <vu1Thread+16777532>)
   at /mnt/games/native_emulators/source_files/pcsx2/common/src/Utilities/Semaphore.cpp:66
#5  0x08099f31 in VU_Thread::ExecuteRingBuffer() (this=0x8de0070 <vu1Thread>) at /mnt/games/native_emulators/source_files/pcsx2/pcsx2/MTVU.cpp:97
#6  0x0809a68c in VU_Thread::ExecuteTaskInThread() (this=0x8de0070 <vu1Thread>) at /mnt/games/native_emulators/source_files/pcsx2/pcsx2/MTVU.cpp:90
#7  0x0837e62f in Threading::pxThread::_try_virtual_invoke(void (Threading::pxThread::*)()) (this=0x8de0070 <vu1Thread>, method=<optimized out>)
   at /mnt/games/native_emulators/source_files/pcsx2/common/src/Utilities/ThreadTools.cpp:545
#8  0x0837f8cb in Threading::pxThread::_internal_execute() (this=0x8de0070 <vu1Thread>)
   at /mnt/games/native_emulators/source_files/pcsx2/common/src/Utilities/ThreadTools.cpp:644
#9  0x0837f9fe in Threading::pxThread::_internal_callback(void*) (itsme=0x8de0070 <vu1Thread>)
   at /mnt/games/native_emulators/source_files/pcsx2/common/src/Utilities/ThreadTools.cpp:684
#10 0xf602b452 in start_thread () at /usr/lib/libpthread.so.0
#11 0xf5f502de in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0xf2dd7a80 (LWP 8261)):
#0  0xf77acba0 in __kernel_vsyscall ()
#1  0xf60337a2 in __lll_timedlock_wait () at /usr/lib/libpthread.so.0
#2  0xf602dfc6 in pthread_mutex_timedlock () at /usr/lib/libpthread.so.0
#3  0x0836c078 in Threading::Mutex::AcquireWithoutYield(wxTimeSpan const&) (this=0xbeb587c, timeout=...)
   at /mnt/games/native_emulators/source_files/pcsx2/common/src/Utilities/Mutex.cpp:128
#4  0x0836c213 in Threading::Mutex::WaitWithoutYield(wxTimeSpan const&) (this=0xbeb587c, timeout=...)
---Type <return> to continue, or q <return> to quit---
   at /mnt/games/native_emulators/source_files/pcsx2/common/src/Utilities/Mutex.cpp:236
#5  0x0837e35e in Threading::pxThread::WaitOnSelf(Threading::Mutex&) const (this=0xbeb5824, mutex=...)
   at /mnt/games/native_emulators/source_files/pcsx2/common/src/Utilities/ThreadTools.cpp:492
#6  0x0837f52a in Threading::pxThread::Cancel(bool) (this=0xbeb5824, isBlocking=true) at /mnt/games/native_emulators/source_files/pcsx2/common/src/Utilities/ThreadTools.cpp:338
#7  0x08351a5f in LinuxPipeRedirection::Cleanup() (this=0xbeb5810) at /mnt/games/native_emulators/source_files/pcsx2/pcsx2/Linux/LnxConsolePipe.cpp:163
#8  0x08351b08 in LinuxPipeRedirection::~LinuxPipeRedirection() (this=0xbeb5810, __in_chrg=<optimized out>)
   at /mnt/games/native_emulators/source_files/pcsx2/pcsx2/Linux/LnxConsolePipe.cpp:150
#9  0x08351b3e in LinuxPipeRedirection::~LinuxPipeRedirection() (this=0xbeb5810, __in_chrg=<optimized out>)
   at /mnt/games/native_emulators/source_files/pcsx2/pcsx2/Linux/LnxConsolePipe.cpp:151
#10 0x081ba01f in Pcsx2App::~Pcsx2App() (this=0xbde812c) at /mnt/games/native_emulators/source_files/pcsx2/common/include/Utilities/ScopedPtr.h:60
#11 0x081ba01f in Pcsx2App::~Pcsx2App() (this=0xbde812c, __in_chrg=<optimized out>) at /mnt/games/native_emulators/source_files/pcsx2/common/include/Utilities/ScopedPtr.h:40
#12 0x081ba01f in Pcsx2App::~Pcsx2App() (this=0xbde7740, __in_chrg=<optimized out>) at /mnt/games/native_emulators/source_files/pcsx2/pcsx2/gui/AppInit.cpp:716
#13 0x081ba39e in Pcsx2App::~Pcsx2App() (this=0xbde7740, __in_chrg=<optimized out>) at /mnt/games/native_emulators/source_files/pcsx2/pcsx2/gui/AppInit.cpp:719
#14 0xf75cf2f1 in wxEntryCleanup() () at /usr/lib/libwx_baseu-3.0.so.0
#15 0xf75cf37c in wxUninitialize() () at /usr/lib/libwx_baseu-3.0.so.0
#16 0xf75d0a54 in wxEntry(int&, wchar_t**) () at /usr/lib/libwx_baseu-3.0.so.0
#17 0xf75d0ae7 in wxEntry(int&, char**) () at /usr/lib/libwx_baseu-3.0.so.0
#18 0x081babff in main(int, char**) (argc=1, argv=0xffebdd94) at /mnt/games/native_emulators/source_files/pcsx2/pcsx2/gui/AppMain.cpp:54
(gdb)

Here is the output of info thread


Code:
(gdb) info thread
 Id   Target Id         Frame
 3    Thread 0xf05ffb40 (LWP 8270) "Redirect_Stdout" 0xf77acba0 in __kernel_vsyscall ()
 2    Thread 0xef1ffb40 (LWP 8274) "MTVU" 0xf77acba0 in __kernel_vsyscall ()
* 1    Thread 0xf2dd7a80 (LWP 8261) "PCSX2" 0xf77acba0 in __kernel_vsyscall ()
(gdb)
Reply
#10
Hmm. Might be the console redirection stuff.
Reply




Users browsing this thread: 1 Guest(s)