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

occ music:scan segfaults #600

Closed
jgrete opened this issue Dec 13, 2017 · 25 comments
Closed

occ music:scan segfaults #600

jgrete opened this issue Dec 13, 2017 · 25 comments
Labels

Comments

@jgrete
Copy link

jgrete commented Dec 13, 2017

Hi,
I'm trying to scan my music collection and after a while I'm getting a segmentation fault (german message: Speicherzugriffsfehler)
command given is:
sudo -u wwwrun php occ music:scan -vv --clean-obsolete userxyz
scanning works for a while, then segmentation fault follows
giving the same command again results in segmentation fault at once.

Scanning for other users works for a while but stops also with a segfault and further behaviour see above.
I'm using Nextcloud 12.0.4
Any hints?

Regards
Juergen

@paulijar
Copy link
Collaborator

Weird, I haven't seen that happen. Is there anything in nextcloud.log? When you say that scanning works for a while, do you mean that it successfully scans some audio files (names of the audio files are printed to the console) and then the crash happens? If you use occ music:reset-database userxyz and then scan again, does the process always stop on the same file?

@jgrete
Copy link
Author

jgrete commented Dec 13, 2017

Yes, it first scans for a while printing the mp3s found. After the segfault nothing more is scanned when I give the same command again. I now experienced that after a couple of hours the scanning goes further beyond the point it segfaults before - but only to segfault again after a while...
These are the log entries after resuming and segfault again:
{"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:10:02+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: filesize at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.tag.apetag.php#25","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:10:02+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fseek() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1740","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:10:02+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"ftell() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1682","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:10:02+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fread() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1705","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:16:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: filesize at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.tag.apetag.php#25","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:16:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fseek() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1740","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:16:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"ftell() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1682","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:16:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fread() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1705","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:26:20+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: filesize at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.tag.apetag.php#25","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:26:20+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fseek() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1740","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:26:20+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"ftell() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1682","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:26:20+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fread() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1705","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:20+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fseek() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1740","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:20+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"ftell() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1682","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:20+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fread() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1705","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:20+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1629","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:20+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1630","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:20+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1631","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:21+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fseek() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1740","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:21+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"ftell() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1682","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:21+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fread() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1705","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:21+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1629","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:21+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1630","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:21+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1631","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:22+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fseek() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1740","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:22+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"ftell() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1682","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:22+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fread() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1705","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:22+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1629","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:22+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1630","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:22+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1631","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:23+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fseek() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1740","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:23+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"ftell() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1682","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:23+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fread() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1705","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:23+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1629","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:23+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1630","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:23+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1631","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:24+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fseek() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1740","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:24+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"ftell() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1682","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:24+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fread() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1705","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:24+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1629","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:24+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1630","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:24+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1631","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:25+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fseek() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1740","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:25+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"ftell() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1682","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:26+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fread() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1705","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:26+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1629","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:26+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1630","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:26+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1631","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fseek() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1740","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"ftell() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1682","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fread() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1705","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1629","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1630","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1631","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:28+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fseek() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1740","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:28+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"ftell() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1682","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:28+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fread() expects parameter 1 to be resource, null given at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/getid3.php#1705","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:28+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1629","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:28+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1630","userAgent":"--","version":"12.0.4.3"} {"reqId":"NTxzHQHQG1n4nqPFRnvH","level":3,"time":"2017-12-13T08:33:28+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: mpeg at \/srv\/www\/htdocs\/nextcloud\/apps\/music\/3rdparty\/getID3\/getid3\/module.audio.mp3.php#1631","userAgent":"--","version":"12.0.4.3"}

@jgrete jgrete closed this as completed Dec 13, 2017
@paulijar
Copy link
Collaborator

Did you close this issue by accident?

From the log extract, it seems like the file pointer passed to the GetID3 library was null. This would happen if the Nextcloud framework cannot open a file for any reason. Is it possible that there is some kind of out-of-sync situation between the internal book-keeping of the Nextcloud core and the actual contents on the disk?

I probably should add some kind of sanity check to the Music app to ensure that failing to open one (or several) files wouldn't break the whole scanning process.

@jgrete
Copy link
Author

jgrete commented Dec 13, 2017

Ahhrg, closed it by accident - not the first time on github :-)
Maybe there are existing some files with strange names - in some parts my collection is very old - from times utf8 & friends where unknown to most human beings (at least german ones).
I've searched through the hole tree and found only one directory where reading wasn't allowed. But it wasn't the reason.
I forgot to mention that the collection is located on external storage. May this has some influence...

@jgrete jgrete reopened this Dec 13, 2017
@jgrete
Copy link
Author

jgrete commented Dec 13, 2017

Just realized, that you want me to reset the database. Done that and scanning - will take a while...

@jgrete
Copy link
Author

jgrete commented Dec 13, 2017

No success - segfault. At the same point...
I took a look what the problem was with this file - it has the length 0.
Starting scanning again. I'll come back later and tell the results

@jgrete
Copy link
Author

jgrete commented Dec 13, 2017

The scanning runs since three hours without segfault. I'm guessing that a file size of 0 was the problem. From the users point of view a warning would be fine
Regards
Juergen

@jgrete
Copy link
Author

jgrete commented Dec 13, 2017

Another kind of exception occured:
[OCP\AppFramework\Db\DoesNotExistException] Did expect one result but found none when executing: query "SELECT * FROMPREFIXmusic_artistsWHEREuser_id= ? ANDhash` = ?"; parameters Array
(
[0] => jgrete
[1] => xxxxxxxxxxxxxxxxxxxxxxx
)
; limit ""; offset ""

Exception trace:
() at /srv/www/htdocs/nextcloud/lib/public/AppFramework/Db/Mapper.php:275
OCP\AppFramework\Db\Mapper->findOneQuery() at /srv/www/htdocs/nextcloud/lib/public/AppFramework/Db/Mapper.php:359
OCP\AppFramework\Db\Mapper->findEntity() at /srv/www/htdocs/nextcloud/apps/music/db/artistmapper.php:108
OCA\Music\Db\ArtistMapper->findUniqueEntity() at /srv/www/htdocs/nextcloud/apps/music/db/basemapper.php:91
OCA\Music\Db\BaseMapper->insertOrUpdate() at /srv/www/htdocs/nextcloud/apps/music/businesslayer/artistbusinesslayer.php:52
OCA\Music\BusinessLayer\ArtistBusinessLayer->addOrUpdateArtist() at /srv/www/htdocs/nextcloud/apps/music/utility/scanner.php:147
OCA\Music\Utility\Scanner->updateAudio() at /srv/www/htdocs/nextcloud/apps/music/utility/scanner.php:115
OCA\Music\Utility\Scanner->update() at /srv/www/htdocs/nextcloud/apps/music/utility/scanner.php:428
OCA\Music\Utility\Scanner->scanFiles() at /srv/www/htdocs/nextcloud/apps/music/command/scan.php:130
OCA\Music\Command\Scan->scanUser() at /srv/www/htdocs/nextcloud/apps/music/command/scan.php:98
OCA\Music\Command\Scan->execute() at /srv/www/htdocs/nextcloud/3rdparty/symfony/console/Command/Command.php:256
Symfony\Component\Console\Command\Command->run() at /srv/www/htdocs/nextcloud/3rdparty/symfony/console/Application.php:818
Symfony\Component\Console\Application->doRunCommand() at /srv/www/htdocs/nextcloud/3rdparty/symfony/console/Application.php:186
Symfony\Component\Console\Application->doRun() at /srv/www/htdocs/nextcloud/3rdparty/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at /srv/www/htdocs/nextcloud/lib/private/Console/Application.php:170
OC\Console\Application->run() at /srv/www/htdocs/nextcloud/console.php:100
require_once() at /srv/www/htdocs/nextcloud/occ:11

music:scan [--all] [--debug] [--clean-obsolete] [--] [<user_id>]...

`
Should I file separate issue for this one?

@jgrete
Copy link
Author

jgrete commented Dec 14, 2017

Segfault again - 0 byte file again. To me it looks like a very strong hint: 0 byte files are evil :-)

@paulijar
Copy link
Collaborator

I created a 0-byte file, named it with suffix mp3, uploaded it to Nextcloud, but this file was scanned successfully by the Music app. Maybe the crash happens only with external storage. Another difference was that I'm using Nextcloud 12.0.3.3.

@paulijar paulijar added the Bug label Dec 14, 2017
@jgrete
Copy link
Author

jgrete commented Dec 14, 2017

Ok, I'll do the same today evening and will also try a 0 byte file on a non-external storage.
Thank you
Juergen

@v0ku
Copy link

v0ku commented Sep 19, 2019

I have exactly the same issue on my nextcloudpi 16. Has someone found the root cause?

@paulijar
Copy link
Collaborator

@v0ku Nope, no root cause has been identified. Are you using external storage like the original reported was? Can you spot the file where the scanning breaks? Is there anything out of the ordinary with that file?

@v0ku
Copy link

v0ku commented Sep 19, 2019 via email

@paulijar
Copy link
Collaborator

Sure, if you can share those, I can check if I can reproduce the problem. You can find my email in my profile.

@paulijar
Copy link
Collaborator

paulijar commented Oct 2, 2019

@v0ku So were you going to share those files with me?

@paulijar
Copy link
Collaborator

Based on the errors shown in the logs attached to this issue, this might actually be a duplicate to #123 which got fixed in Music app v0.14.0.

@trendzetter
Copy link

trendzetter commented Nov 10, 2020

@paulijar Still segfault on 0 byte file on external storage...

@rob-sve
Copy link

rob-sve commented Jan 10, 2021

Same here on Nextcloud 20.0.4 with Music 0.17.3. My external storage is an SMB share, so I originally thought something was up with the file being read through the share or something similar, but looking at the actual file in a terminal directly on the filesystem it is also 0B in size.

I suspect that the folder for this file (and the others that I ran into which I removed) was originally a soft link to another filesystem, since I have moved files into my normal music folder and then linked them to the previous place as to not break references. And indeed this particular song can be found in my normal music directory. But looking at the file and folder doesn't indicate that it is a broken link or anything. I have however migrated the parent folder its in to a new filesystem on a larger drive (using rsync) in the past. Maybe that somehow converted the link into a normal directory?

But in another case I had I'm pretty sure it was not a link originally, so this might be a red herring.

@rarealphacat
Copy link

getting segfault with occ scan:music --all as below, I tried reset database without luck, any ideas?

ValueError: fread(): Argument #2 ($length) must be greater than 0 in /var/www/html/nextcloud/apps/music/3rdparty/getID3/getid3/getid3.php:2215
Stack trace:
#0 /var/www/html/nextcloud/apps/music/3rdparty/getID3/getid3/getid3.php(2215): fread()
#1 /var/www/html/nextcloud/apps/music/3rdparty/getID3/getid3/module.audio.flac.php(408): getid3_handler->fread()
#2 /var/www/html/nextcloud/apps/music/3rdparty/getID3/getid3/module.audio.flac.php(125): getid3_flac->parsePICTURE()
#3 /var/www/html/nextcloud/apps/music/3rdparty/getID3/getid3/module.audio.flac.php(46): getid3_flac->parseMETAdata()
#4 /var/www/html/nextcloud/apps/music/3rdparty/getID3/getid3/getid3.php(778): getid3_flac->Analyze()
#5 /var/www/html/nextcloud/apps/music/lib/Utility/ExtractorGetID3.php(75): getID3->analyze()
#6 /var/www/html/nextcloud/apps/music/lib/Utility/Scanner.php(171): OCA\Music\Utility\ExtractorGetID3->extract()
#7 /var/www/html/nextcloud/apps/music/lib/Utility/Scanner.php(119): OCA\Music\Utility\Scanner->extractMetadata()
#8 /var/www/html/nextcloud/apps/music/lib/Utility/Scanner.php(480): OCA\Music\Utility\Scanner->updateAudio()
#9 /var/www/html/nextcloud/apps/music/lib/Command/Scan.php(117): OCA\Music\Utility\Scanner->scanFiles()
#10 /var/www/html/nextcloud/apps/music/lib/Command/Scan.php(91): OCA\Music\Command\Scan->scanUser()
#11 /var/www/html/nextcloud/apps/music/lib/Command/BaseCommand.php(63): OCA\Music\Command\Scan->doExecute()
#12 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Music\Command\BaseCommand->execute()
#13 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#14 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#15 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#16 /var/www/html/nextcloud/lib/private/Console/Application.php(209): Symfony\Component\Console\Application->run()
#17 /var/www/html/nextcloud/console.php(99): OC\Console\Application->run()
#18 /var/www/html/nextcloud/occ(11): require_once('...')
#19 {main}Segmentation fault

@paulijar
Copy link
Collaborator

@rarealphacat When scanning with occ, you should see the path of the file to be scanned next just before you hit the segfault. Can you check if this is a 0-byte file, like the case has been with others on this thread? If not, then you have found some new and unique bug which is more interesting. In that case, could you share the culprit file with me? You can find my email from my github profile.

@rarealphacat
Copy link

rarealphacat commented Nov 20, 2021

@paulijar Thanks! I found the problematic file but its not a 0-byte file. Sending the file over now.
*The file caused same problem happens to the audio player app too

@paulijar
Copy link
Collaborator

@rarealphacat Thanks, I got the file. For me, this doesn't cause a segmentation fault but I do see a warning logged like fread(): Length parameter must be greater than 0. I'm using PHP 7.4, are you maybe using PHP 8? Because PHP 8 is more strict on proper use of its APIs and there are many places where incorrect API use on PHP 7 causes a warning but on PHP 8 it's a fatal error.

paulijar added a commit that referenced this issue Nov 21, 2021
- Don't try to analyze 0-byte files as that apparently causes a
  segmentation fault on (some) SMB setups

- Catch all exceptions and errors from the getID3 library so that
  hitting a bug on one file wouldn't stop the whole scan process

refs #600
@paulijar
Copy link
Collaborator

A fix for the invalid length parameter being passed to fread() has been created in the upstream project: JamesHeinrich/getID3#351. It shall be included in the next Music app release.

Furthermore, I have made a fix of not even attempting to analyze 0-byte files, as that apparently still causes problems for some systems. It's not like we would be getting any metadata from such files, anyway.

@paulijar
Copy link
Collaborator

The updated getID3 library is now released as part of Music v1.5.0. Likewise, this version no longer tries to scan 0-byte files. Hence, I believe that all the cases reported here should be fixed now. Please open a new issue if you still see any problems like this.

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

No branches or pull requests

6 participants