beandog / bluray_info

Linux/BSD Blu-ray utilities - bluray_info, bluray_copy, bluray_player
GNU General Public License v2.0
40 stars 2 forks source link

zsh: segmentation fault bluray_info #1

Closed soredake closed 6 years ago

soredake commented 7 years ago

@beandog

beandog commented 6 years ago

What's it doing?

soredake commented 6 years ago

Trying to open blu-ray rips. 新世紀エヴァンゲリオン/KIXA_90501 zsh: segmentation fault bluray_info ./ Logs: strace bluray_info ./ log ls -l */*/* log

another blu-ray rip (A.Street.Cat.Named.Bob.2016.COMPLETE.BLURAY-OCULAR)

bdj.c:661: BD-J check: Failed to load JVM library
bdj.c:661: BD-J check: Failed to load JVM library
zsh: segmentation fault  bluray_info ./

Logs: strace bluray_info ./ log ls -l */*/* log

System: Gentoo stable, kernel 4.12.12, ZFS filesystem mpv $PWD opens it fine

beandog commented 6 years ago

Hmm, I can't dupe it with just zsh .. any other information you can throw my way?

Is there anything else using libbluray that can open it without issues (like mpv, mplayer, vlc)? Are you on latest git or doing a point release? Which OS, etc. Accessing disc, ISO, folder?

That's all I can think to ask right now.

soredake commented 6 years ago

Ok, added some info. Maybe KIXA_90501 missing some info that present in another rip...

DefueBugs commented 6 years ago

I've run into the same issue. I'm not a programmer but I am a long time Gentoo user. The nature of what I see leads me to suspect you may have a problem with compiler directives due to Gentoo's move to gcc-6.4+ and PIE/PIC everywhere by default. We recently {last 6-9 months) had to migrate {re-compile the world}. I'm not set up for backtracing/debugging and I don't have the knowledge set to do so. I tested BDMV playback using 'mpv' in commandline mode. Doing this opens a konsole box with mpv status messages. I also give you the associated dmesg from the segment fault. The sedment fault seems to appear immediately when libluray is called from bluray_info. mpv seem to be successful in calling libluray. I also included some of my Gentoo configuration information below. `Playing: /Silo05/ADC/The.Battleship.Island.2017.TW.BluRay.1080p.AVC.DTS-HD.MA.5.1-DiY@HDHome/BDMV/MovieObject.bdmv [bdmv/bluray] BDMV detected. Redirecting to bluray:// [ffmpeg/demuxer] mpegts: Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size [ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' and 'probesize' options [ffmpeg/demuxer] mpegts: Could not find codec parameters for stream 5 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size [ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' and 'probesize' options [ffmpeg/demuxer] mpegts: Could not find codec parameters for stream 6 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size [ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' and 'probesize' options [ffmpeg/demuxer] mpegts: Could not find codec parameters for stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size [ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' and 'probesize' options (+) Video --vid=1 (h264 1920x1080 24.000fps) (+) Audio --aid=1 --alang=kor (truehd 6ch 48000Hz) Audio --aid=2 --alang=kor (ac3 6ch 48000Hz) Audio --aid=3 --alang=kor (dts 6ch 48000Hz) Subs --sid=1 --slang=zho (hdmv_pgs_subtitle) (+) Subs --sid=2 --slang=eng (hdmv_pgs_subtitle) Subs --sid=3 --slang=zho (hdmv_pgs_subtitle) Subs --sid=4 --slang=zho (hdmv_pgs_subtitle) AO: [pulse] 48000Hz 5.1(side) 6ch s32 VO: [opengl] 1920x1080 yuv420p

[1614234.309308] bluray_info[10438]: segfault at 0 ip 00007f31b681116c sp 00007fff71504c68 error 4 in libc-2.26.so[7f31b66c0000+1b7000]

--0--

Playing: /Silo05/ADC/The Solitary Gourmet S02 2012 1080i JPN Blu-ray AVC LPCM2.0-ARiN/KODOKUNO_GURUME_SEASON2_D1/BDMV/MovieObject.bdmv [bdmv/bluray] BDMV detected. Redirecting to bluray:// (+) Video --vid=1 (h264 1920x1080 29.970fps) (+) Audio --aid=1 --alang=jpn (pcm_bluray 2ch 48000Hz) File tags: Title: T1_PGM AO: [pulse] 48000Hz stereo 2ch s16 VO: [opengl] 1920x1080 yuv420p

Playing: /Silo05/ADC/The Solitary Gourmet S02 2012 1080i JPN Blu-ray AVC LPCM2.0-ARiN/KODOKUNO_GURUME_SEASON2_D1/BDMV/MovieObject.bdmv [bdmv/bluray] BDMV detected. Redirecting to bluray:// (+) Video --vid=1 (h264 1920x1080 29.970fps) (+) Audio --aid=1 --alang=jpn (pcm_bluray 2ch 48000Hz) File tags: Title: T1_PGM AO: [pulse] 48000Hz stereo 2ch s16 VO: [opengl] 1920x1080 yuv420p

[1614475.831990] bluray_info[12887]: segfault at 0 ip 00007ffb4622916c sp 00007ffd107b2a18 error 4 in libc-2.26.so[7ffb460d8000+1b7000]`

Portage 2.3.19 (python 2.7.14-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-7.2.0, glibc-2.26-r5, 4.14.12-gentoo x86_64)
=================================================================
System uname: Linux-4.14.12-gentoo-x86_64-AMD_A10-7850K_Radeon_R7,_12_Compute_Cores_4C+8G-with-gentoo-2.4.1
KiB Mem:    31843704 total,    329400 free
KiB Swap:   33523428 total,  33523428 free
Timestamp of repository gentoo: Mon, 08 Jan 2018 18:30:01 +0000
Head commit of repository gentoo: e1643c062300cb1771eb0b0804aed40e73170901
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.6-r1::gentoo, 3.5.4-r1::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.10.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0::gentoo, 7.2.0::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.14::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r5::gentoo
...
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=bdver3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="-march=bdver3 -O2 -pipe"
CPU_FLAGS_X86="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop"

Hope this helps

Note: I am set up with a local repository and can test ebuilds at need.

DefueBugs commented 6 years ago

I tested both the other alernative queries:

Examples: bluray_info /dev/bluray bluray_info movie.iso bluray_info bluray/ ^^^^^^^^^^^^^ This is the query which is giving a segment fault.

`# bluray_info -vams /Silo05/ADC/千と千尋の神隠し.iso Title: 001, Playlist: 0001, Length: 02:04:32.25, Chapters: 026, Video streams: 01, Audio streams: 09, Subtitles: 07, Filesize: 37681 MB Video: 01, Format: 1080p, Aspect ratio: 16:9, FPS: 23.97, Codec: h264 Audio: 01, Language: jpn, Codec: lpcm, Format: stereo, Rate: 48 Audio: 02, Language: jpn, Codec: dtshd, Format: multi_chan, Rate: 48 Audio: 03, Language: eng, Codec: ac3, Format: multi_chan, Rate: 48 Audio: 04, Language: fra, Codec: ac3, Format: multi_chan, Rate: 48 Audio: 05, Language: deu, Codec: ac3, Format: multi_chan, Rate: 48 Audio: 06, Language: fin, Codec: ac3, Format: stereo, Rate: 48 Audio: 07, Language: kor, Codec: ac3, Format: multi_chan, Rate: 48 Audio: 08, Language: zho, Codec: ac3, Format: multi_chan, Rate: 48 Audio: 09, Language: zho, Codec: ac3, Format: multi_chan, Rate: 48 Subtitle: 01, Language: jpn Subtitle: 02, Language: eng Subtitle: 03, Language: fra Subtitle: 04, Language: deu Subtitle: 05, Language: kor Subtitle: 06, Language: zho Subtitle: 07, Language: zho

bluray_info -vams

Title: 065, Playlist: 1220, Length: 01:32:27.29, Chapters: 021, Video streams: 01, Audio streams: 01, Subtitles: 02, Filesize: 21951 MB Video: 01, Format: 1080p, Aspect ratio: 16:9, FPS: 23.97, Codec: h264 Audio: 01, Language: eng, Codec: dtshd, Format: multi_chan, Rate: 48 Subtitle: 01, Language: eng Subtitle: 02, Language: spa`

beandog commented 6 years ago

Okay, a couple of things --

1) are you running bluray_info-1.0.0 in the portage tree or my git release 2) I've always compiled with clang, not gcc, so I'm gonna add that to my testing, thanks 3) how did you mount bluray/ ? I'm getting segfaults as well, so I can track it down, but want to see your mount options -- I'm just doing -t udf -o ro myself

beandog commented 6 years ago

Looks like the second it trys to open the bluray using libbluray, it segfaults: bd = bd_open(device_filename, key_db_filename);

So I'm just gonna take away opening directories as an option.

beandog commented 6 years ago

Scratch that. I just wasn't initializing stuff properly, and it was causing problems. Fixed now. Directories ftw!

soredake commented 6 years ago

@beandog can you please add aclocal.m4 configure.ac Makefile.{am,in} to the repo?

beandog commented 6 years ago

Sure. Added configure.ac and Makefile.am. Run "autoreconf -fi" to build ./configure etc.

soredake commented 6 years ago

No segfault with latest version from git, thanks!

beandog commented 6 years ago

@DefueBugs is this release working for you, too, now?

DefueBugs commented 6 years ago

I apologise. I'm not currently set up to test from 'git' without a -9999 ebuild. And I haven't looked into creating one myself yet. I do have several packages where I use -9999 ebuilds so the idea of building from source trunk repositories is fine with me. If you have an overlay available and can point me at it, I'll be happy to test for you. Or point me to a custom ebuild I can copy into my local tree. I'm in the middle of NAS updating and maintenance as well as migrating my torrent daemons to my NAS. Would be able to test as early as tomorrow.

beandog commented 6 years ago

It's in the portage tree now, try that.

DefueBugs commented 6 years ago

Tested all three query formats. All worked perfectly. Thank you.

beandog commented 6 years ago

Cool, thanks guys :)