Page 1 of 1

Crash at CIFSSMBSetEA.cold+0xc/0x18 [cifs]

Posted: 08 Apr 2023, 06:12
by wizzd
Hi

When running the below command from qbt webui, the file is correcly copied to the planned location on /nas, but the script doesn't complete fully i.e. mail isn't sent and there is no output to amc.log.

Everything works when using a local output (/storage/torrent/xxx/zzz). The problem comes when using /nas, which is mapped to my nas box.

Code: Select all

filebot -script fn:amc --output "/nas" --action copy --def clean=y --conflict skip -non-strict --def deleteAfterExtract=y --log-file "/storage/torrent/amc.log"   --def subtitles=en,da --def movieFormat=movies/{plex} seriesFormat=serier/{plex.tail} --def [email protected]:email_key "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"

If there is no mkv.file at the destination, and I run the amc script, the mkv.file is generated but there there is no log output.


If I run the amc script when there is an mkv.fil at the destination, the log is populated.
Output from failed run (when there is a file at destination)

Code: Select all

$USER@plex:~$ cat /storage/torrent/amc.log 
# Application Bundle
FileBot 5.0.1 (r9665) / Groovy 4.0.9 / OpenJDK Runtime Environment 11.0.18 / Linux 5.15.0-69-generic (amd64)
# Local Time
Sat Apr 08 05:22:04 UTC 2023
# Process Tree
└─ /usr/bin/dash
└─ /usr/lib/jvm/java-11-openjdk-amd64/bin/java
# Environment Variables
HOME = /home/$USER
INVOCATION_ID = 3186c08356b148e38a12da4579c0db7a
JOURNAL_STREAM = 8:21664
LANG = en_US.UTF-8
PATH = /sbin:/usr/sbin:/bin:/usr/bin
PWD = /
SYSTEMD_EXEC_PID = 792
http_proxy = 
https_proxy = 
sock_proxy = 
# Java System Properties
application.cache = /home/$USER/.filebot/cache
application.deployment = deb
application.dir = /home/$USER/.filebot
awt.toolkit = sun.awt.X11.XToolkit
awt.useSystemAAFontSettings = on
file.encoding = UTF-8
file.separator = /
grape.root = /home/$USER/.filebot/grape
http.agent = FileBot/5.0.1
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.awt.printerjob = sun.print.PSPrinterJob
java.class.path = /usr/share/filebot/jar/filebot.jar
java.class.version = 55.0
java.home = /usr/lib/jvm/java-11-openjdk-amd64
java.io.tmpdir = /home/$USER/.filebot/tmp
java.library.path = /usr/lib/x86_64-linux-gnu/jni
java.net.useSystemProxies = false
java.runtime.name = OpenJDK Runtime Environment
java.runtime.version = 11.0.18+10-post-Ubuntu-0ubuntu122.04
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 11
java.vendor = Ubuntu
java.vendor.url = https://ubuntu.com/
java.vendor.url.bug = https://bugs.launchpad.net/ubuntu/+source/openjdk-lts
java.version = 11.0.18
java.version.date = 2023-01-17
java.vm.compressedOopsMode = 32-bit
java.vm.info = mixed mode, sharing
java.vm.name = OpenJDK 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 11
java.vm.vendor = Ubuntu
java.vm.version = 11.0.18+10-post-Ubuntu-0ubuntu122.04
jdk.debug = release
jdk.logger.packages = net.filebot.Log
jdk.module.path = /usr/share/openjfx/lib
jna.boot.library.name = jnidispatch.system
jna.boot.library.path = /usr/lib/x86_64-linux-gnu/jni
jna.library.path = /usr/lib/x86_64-linux-gnu/jni
jna.noclasspath = true
jna.nosys = false
jna.nounpack = true
line.separator = ↲
net.filebot.archive.extractor = ShellExecutables
net.filebot.gio.GVFS = /gvfs
net.filebot.logging.debug = INFO
net.filebot.theme = Darcula
org.apache.commons.logging.Log = org.apache.commons.logging.impl.NoOpLog
os.arch = amd64
os.name = Linux
os.version = 5.15.0-69-generic
path.separator = :
prism.order = sw
sun.arch.data.model = 64
sun.boot.library.path = /usr/lib/jvm/java-11-openjdk-amd64/lib
sun.cpu.endian = little
sun.cpu.isalist = 
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = /usr/share/filebot/jar/filebot.jar -script fn:amc --output /nas --action copy --def clean=y --conflict skip -non-strict --def deleteAfterExtract=y --log-file /storage/torrent/amc.log --def subtitles=en,da --def movieFormat=movies/{plex} seriesFormat=serier/{plex.tail} --def [email protected]:email_key ut_dir=/storage/torrent/download/ABCD ut_kind=multi ut_title=ABCD ut_label=
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = UTF-8
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
sun.net.client.defaultConnectTimeout = 10000
sun.net.client.defaultReadTimeout = 60000
sun.os.patch.level = unknown
swing.crossplatformlaf = javax.swing.plaf.nimbus.NimbusLookAndFeel
unixfs = false
useCreationDate = false
useExtendedFileAttributes = true
useGVFS = true
user.country = US
user.dir = /
user.home = /home/$USER
user.language = en
user.name = $USER
user.timezone = Etc/UTC
# Arguments
└─ -script
└─ fn:amc
└─ --output
└─ /nas
└─ --action
└─ copy
└─ --def
└─ clean=y
└─ --conflict
└─ skip
└─ -non-strict
└─ --def
└─ deleteAfterExtract=y
└─ --log-file
└─ /storage/torrent/amc.log
└─ --def
└─ subtitles=en,da
└─ --def
└─ movieFormat=movies/{plex}
└─ seriesFormat=serier/{plex.tail}
└─ --def
└─ [email protected]:email_key
└─ ut_dir=/storage/torrent/download/ABCD
└─ ut_kind=multi
└─ ut_title=ABCD
└─ ut_label=
Low Disk Space (3.5 GB) on / (/dev/mapper/ubuntu--vg-ubuntu--lv)
Script Bundle: 2023-03-28 (r895)
Run script [fn:amc] at [Sat Apr 08 05:22:06 UTC 2023]

[PSA] Important Discussion of Proposed Changes:
https://www.filebot.net/forums/viewtopic.php?t=13406

Parameter: clean = y
Parameter: deleteAfterExtract = y
Parameter: subtitles = en,da
Parameter: movieFormat = movies/{plex}
Parameter: seriesFormat = serier/{plex.tail}
Parameter: gmail = *****
Parameter: ut_dir = /storage/torrent/ABCD
Parameter: ut_kind = multi
Parameter: ut_title = ABCD
Parameter: ut_label = 
Input: /storage/torrent/download/ABCD.mkv
Group: {Series=ABCD} => [ABCD.mkv]
Get [English] subtitles for 1 file
Looking up subtitles by hash via OpenSubtitles
No subtitles: /storage/torrent/download/ABCD/ABCD.mkv (English)
Get [Danish] subtitles for 1 file
Looking up subtitles by hash via OpenSubtitles
No subtitles: /storage/torrent/download/ABCD/ABCD.mkv (Danish)
Rename episodes using [TheMovieDB] with [Airdate Order]
Lookup via [ABCD] [ABCD]
Fetching episode data for [ABCD]
└─ 357 episodes
Activate License [LICENSE] on [Sat Apr 08 05:22:13 UTC 2023]
[SKIP] Skipped [/storage/torrent/download/ABCD/ABCD.mkv] because [/nas/serier/ABCD/Season xx/ABCD.mkv] already exists
Processed 0 files
Finished without processing any files
Failure (×_×)⌒☆

As there is no log output, let me know if more info is needed.


Sysinfo

Code: Select all

$USER@plex:~$ filebot -script fn:sysinfo
# Application Bundle
FileBot 5.0.1 (r9665) / Groovy 4.0.9 / OpenJDK Runtime Environment 11.0.18 / Linux 5.15.0-69-generic (amd64)
# Local Time
Sat Apr 08 05:25:58 UTC 2023
# Process Tree
└─ /usr/bin/bash
└─ /usr/bin/dash
└─ /usr/lib/jvm/java-11-openjdk-amd64/bin/java
# Environment Variables
DBUS_SESSION_BUS_ADDRESS = unix:path=/run/user/1000/bus
HOME = /home/$USER
LANG = en_US.UTF-8
LESSCLOSE = /usr/bin/lesspipe %s %s
LESSOPEN = | /usr/bin/lesspipe %s
LOGNAME = $USER
LS_COLORS = rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
MOTD_SHOWN = pam
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PWD = /home/$USER
SHELL = /bin/bash
SHLVL = 1
SSH_CLIENT = 192.168.1.252 58983 22
SSH_CONNECTION = 192.168.1.252 58983 192.168.2.13 22
SSH_TTY = /dev/pts/0
TERM = xterm-256color
USER = $USER
XDG_DATA_DIRS = /usr/local/share:/usr/share:/var/lib/snapd/desktop
XDG_RUNTIME_DIR = /run/user/1000
XDG_SESSION_CLASS = user
XDG_SESSION_ID = 11
XDG_SESSION_TYPE = tty
_ = /usr/bin/filebot
# Java System Properties
application.cache = /home/$USER/.filebot/cache
application.deployment = deb
application.dir = /home/$USER/.filebot
awt.toolkit = sun.awt.X11.XToolkit
awt.useSystemAAFontSettings = on
file.encoding = UTF-8
file.separator = /
grape.root = /home/$USER/.filebot/grape
http.agent = FileBot/5.0.1
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.awt.printerjob = sun.print.PSPrinterJob
java.class.path = /usr/share/filebot/jar/filebot.jar
java.class.version = 55.0
java.home = /usr/lib/jvm/java-11-openjdk-amd64
java.io.tmpdir = /home/$USER/.filebot/tmp
java.library.path = /usr/lib/x86_64-linux-gnu/jni
java.net.useSystemProxies = false
java.runtime.name = OpenJDK Runtime Environment
java.runtime.version = 11.0.18+10-post-Ubuntu-0ubuntu122.04
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 11
java.vendor = Ubuntu
java.vendor.url = https://ubuntu.com/
java.vendor.url.bug = https://bugs.launchpad.net/ubuntu/+source/openjdk-lts
java.version = 11.0.18
java.version.date = 2023-01-17
java.vm.compressedOopsMode = 32-bit
java.vm.info = mixed mode, sharing
java.vm.name = OpenJDK 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 11
java.vm.vendor = Ubuntu
java.vm.version = 11.0.18+10-post-Ubuntu-0ubuntu122.04
jdk.debug = release
jdk.logger.packages = net.filebot.Log
jdk.module.path = /usr/share/openjfx/lib
jna.boot.library.name = jnidispatch.system
jna.boot.library.path = /usr/lib/x86_64-linux-gnu/jni
jna.library.path = /usr/lib/x86_64-linux-gnu/jni
jna.noclasspath = true
jna.nosys = false
jna.nounpack = true
line.separator = ↲
net.filebot.archive.extractor = ShellExecutables
net.filebot.gio.GVFS = /run/user/1000/gvfs
net.filebot.logging.debug = INFO
net.filebot.theme = Darcula
org.apache.commons.logging.Log = org.apache.commons.logging.impl.NoOpLog
os.arch = amd64
os.name = Linux
os.version = 5.15.0-69-generic
path.separator = :
prism.order = sw
sun.arch.data.model = 64
sun.boot.library.path = /usr/lib/jvm/java-11-openjdk-amd64/lib
sun.cpu.endian = little
sun.cpu.isalist = 
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = /usr/share/filebot/jar/filebot.jar -script fn:sysinfo
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = UTF-8
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
sun.net.client.defaultConnectTimeout = 10000
sun.net.client.defaultReadTimeout = 60000
sun.os.patch.level = unknown
swing.crossplatformlaf = javax.swing.plaf.nimbus.NimbusLookAndFeel
unixfs = false
useCreationDate = false
useExtendedFileAttributes = true
useGVFS = true
user.country = US
user.dir = /home/$USER
user.home = /home/$USER
user.language = en
user.name = $USER
user.timezone = Etc/UTC
# Arguments
└─ -script
└─ fn:sysinfo
Low Disk Space (3.5 GB) on / (/dev/mapper/ubuntu--vg-ubuntu--lv)
Script Bundle: 2023-03-28 (r895)
FileBot 5.0.1 (r9665)
JNA Native: 6.1.1
MediaInfo: 21.09
Tools: fpcalc/1.5.1 7z/16.02 unrar/6.11
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2023-03-28 (r895)
Groovy: 4.0.9
JRE: OpenJDK Runtime Environment 11.0.18
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 517 MB Max Memory / 44 MB Used Memory
OS: Linux (amd64)
HW: Linux plex 5.15.0-69-generic #76-Ubuntu SMP Fri Mar 17 17:19:29 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
CPU/MEM: Common KVM processor [MemTotal: 2.1 GB | MemFree: 930 MB | MemAvailable: 1.5 GB | SwapTotal: 1.9 GB | SwapFree: 1.9 GB]
STORAGE: ext4 [/] @ 3.5 GB | ext4 [/storage] @ 149 GB | cifs [/nas/serier] @ 920 GB | cifs [/nas/movies] @ 920 GB | cifs [/nas/movies2] @ 920 GB
UID/GID: uid=1000($USER) gid=1000($USER) groups=1000($USER),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),110(lxd)
DATA: /home/$USER/.filebot
Package: DEB
License: FileBot License LICENSE_KEY (Valid-Until: 2024-04-14)
Done ヾ(@⌒ー⌒@)ノ

Re: Issues when using mounted cifs

Posted: 08 Apr 2023, 06:28
by rednoah
:idea: If there is no log, then filebot is not called, OR filebot is called and can't write to the log file, something along those lines. You will see error message printed to the console output if this is the case.

:idea: If there is some logging, which abruptly ends, then the process crashed. In this case you will see console output printed by the OS informing you the the process at hand crashed, and some debug information.



:arrow: Either way, you want to make qBT run your own bash script (which always works and cannot not be called; unless it's a qBT issue) and then do some logging for yourself, so that we can see the error messages that are printed to the console output:
viewtopic.php?t=3067



e.g. /path/to/my-filebot-middle-man-script-with-extra-logging.sh

Code: Select all

#!/bin/sh

# print current time
date >> "/path/to/log.txt"

# print environment and argument array
filebot "$@" -script fn:sysenv >> "/path/to/log.txt" 2>&1

# run filebot with the given argument array and collect standard output and error output
filebot "$@" >> "/path/to/log.txt" 2>&1



EDIT:

I've added example "debug middleman" here:
https://github.com/filebot/plugins/blob ... t-debug.sh
rednoah wrote: 09 Oct 2015, 16:48 The FileBot Debug Script:

If the problem is difficult to pin down, then we can write our own filebot-debug.sh command, and exchange the filebot command with or own filebot-debug.sh command, that behaves exactly as if it was the filebot command by calling filebot internally, but with lots of custom debug output before and after, and redirecting all standard output and error output, so that we can see exactly how filebot is called and what filebot is doing, even if filebot itself crashes on startup or during runtime.

e.g. debug qBT integration

Code: Select all

/path/to/filebot-debug.sh @/path/to/args.txt --def "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"

Re: Issues when using mounted cifs

Posted: 08 Apr 2023, 10:00
by wizzd
I ran the amc script from console and got these lines which are warnings or errors - i just post these exceptional lines -if you want all of it, please let me know.

Changed logging to net.filebot.logging.debug=ALL

Code: Select all

Apr 08, 2023 9:25:24 AM net.sf.ehcache.store.disk.DiskStorageFactory <init>
WARNING: The index for data file /home/$USER/.filebot/cache/0/tmdb_en-us_1c.data is out of date, probably due to an unclean shutdown. Deleting index file /home/$USER/.filebot/cache/0/tmdb_en-us_1c.index

Code: Select all

Apr 08, 2023 9:25:25 AM net.sf.ehcache.store.disk.DiskStorageFactory <init>
WARNING: The index for data file /home/$USER/.filebot/cache/0/tmdb_1c.data is out of date, probably due to an unclean shutdown. Deleting index file /home/$USER/.filebot/cache/0/tmdb_1c.index
These are the last lines from the console output.

Code: Select all

[COPY] from [/storage/torrent/download/ABCD/ABCD.mkv] to [/nas/serier/ABCD/Season 18/ABCD.mkv]
CLONE: Inappropriate ioctl for device / Invalid cross-device link
Write [xattr:net.filebot.metadata] {"@type":"Episode","seriesName":"ABCD","season":18,"episode":22,"title":"ABCD","absolute":xxx,"airdate":{"year":2020,"month":11"day":21},"id":xxx,"group":"Season 18","seriesInfo":{"database":"TheMovieDB::TV","order":"Airdate","language":"en-US","type":"Scripted","id":xxx,"name":"ABCD","aliasNames":["ABCD"],"certification":"TV-14","startDate":{"year":2005,"month":2,"day":6},"genres":["Animation","Comedy"],"spokenLanguages":["en"],"network":"xxx","rating":1.234,"ratingCount":1762,"runtime":22,"status":"Returning Series"}}

amc.log cuts off suddenly.... the last lines are

Code: Select all

MetricCascade(SeasonEpisode, AirDate, Title) -1.0000 => [/storage/torrent/download/ABCD/ABCD.mkv, ABCD]
MetricCascade(SeasonEpisode, AirDate, Title) -1.0000 => [/storage/torrent/download/ABCD/ABCD.mkv, ABCD]
MetricCascade(SeasonEpisode, AirDate, Title) -1.0000 => [/storage/torrent/download/ABCD/ABCD.mkv, ABCD]
MetricCascade(SeasonEpisode, AirDate, Title) -1.0000 => [/stor

EDIT:
I didn't see your addition about filebot-debug script, please let me know if I should do this as well of if the above is enough.

EDIT 2:
I ran the script replacing the nas destination with a local one, and that completes... the additional lines were.

Code: Select all

Write [xattr:net.filebot.filename] ABCD.mkv
Processed 1 file
Sending Gmail report
Done ヾ(@⌒ー⌒@)ノ

Re: Issues when using mounted cifs

Posted: 08 Apr 2023, 11:17
by rednoah
This warning means that FileBot crashed last time it ran, and so this is just a after effect of FileBot crashing for unknown reasons, and unfortunately tells us nothing:

Code: Select all

WARNING: The index for data file ... is out of date, probably due to an unclean shutdown. Deleting index file ...

wizzd wrote: 08 Apr 2023, 10:00 amc.log cuts off suddenly.... the last lines are

Code: Select all

MetricCascade(SeasonEpisode, AirDate, Title) -1.0000 => [/storage/torrent/download/ABCD/ABCD.mkv, ABCD]
MetricCascade(SeasonEpisode, AirDate, Title) -1.0000 => [/storage/torrent/download/ABCD/ABCD.mkv, ABCD]
MetricCascade(SeasonEpisode, AirDate, Title) -1.0000 => [/storage/torrent/download/ABCD/ABCD.mkv, ABCD]
MetricCascade(SeasonEpisode, AirDate, Title) -1.0000 => [/stor
This is most strange. FileBot crashing mid-line might indicate that FileBot isn't crashing at any one specific step, but is somehow killed by a higher power, i.e. the OS itself if there are enforced resource limits, or perhaps the file system driver is just crashing, though that latter would be even more unusual.



:arrow: My previous EDIT explains how to tackle this kind of issue. You'll want to have your own shell process collect and write console output, so that you can get capture console output even if filebot process crashes:
rednoah wrote: 09 Oct 2015, 16:48 The FileBot Debug Script:

If the problem is difficult to pin down, then we can write our own filebot-debug.sh command, and exchange the filebot command with or own filebot-debug.sh command, that behaves exactly as if it was the filebot command by calling filebot internally, but with lots of custom debug output before and after, and redirecting all standard output and error output, so that we can see exactly how filebot is called and what filebot is doing, even if filebot itself crashes on startup or during runtime.

e.g. debug qBT integration

Code: Select all

/path/to/filebot-debug.sh @/path/to/args.txt --def "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"



EDIT:

If it consistently crashes after this line, then that would indicate that it crashes during xattr metadata write operations, i.e. a OS or remote file system implementation bug:

Code: Select all

Write [xattr:net.filebot.metadata] ...
:arrow: Adding -no-xattr to disable xattr metadata will allow us to confirm if this is indeed the source of the crash or not.

Re: Issues when using mounted cifs

Posted: 09 Apr 2023, 12:57
by wizzd
Thanks for the reply, I've been away, hence my delayed reply.

Regarding the man in the middle debug script; I'm not skilled enough in bash/linux that I understand how to do this and honestly i wouldn't know what to google 😀 If this is relevant for you to understand in general, I'd be happy to try, but I would need a bit of guidance 😀

-no-xattr
I ran the script with this parameter and this made the amc complete sucessfully - email and everything. It did however still have this line in the log output. Don't know if this is relevant.

Code: Select all

CLONE: Inappropriate ioctl for device / Invalid cross-device link
What am I missing out on if I run amc with -no-xattr set?

Since the issue doesn't appear when using local storage, I think you're right about the file system part.
For reference, here's the line from fstab where I mount the cifs... it's a synology nas running btrfs - maybe this can point us somewhere? It has xattr in the line...

Code: Select all

//192.168.1.205/serier /nas/serier cifs username=$USER,password=$PWD,workgroup=your_workgroup,vers=1.0,users,auto,user_xattr 0 0

Re: Issues when using mounted cifs

Posted: 09 Apr 2023, 13:33
by rednoah

Code: Select all

CLONE: Inappropriate ioctl for device / Invalid cross-device link
If you use --action copy then FileBot will "copy-on-write clone if possible, or copy if necessary" and this debug messages tells you that creating a copy-on-write clone was not possible, which means that FileBot created a physical copy instead:
viewtopic.php?t=4915

:idea: You're seeing this message because you have enabled debug logging. You can disable debug logging to hide this message.



:!: If -no-xattr indeed solves the issue, and you can reliably reproduce the issue, then you'll want to contact the maintainer of the CIFS file system driver you are using, because file system operations crashing processes is a serious issue, and they might want your help with reproducing and debugging the issue. I don't know what the user_xattr 0 0 configuration does, but xattr file system operations working or not working isn't an issue, because the requested operation should either work or return with an error, but never ever crash the entire process.



:idea: xattr metadata is useful for remembering which file is which Movie or Episode. Please read Metadata and Extended Attributes for details.


wizzd wrote: 09 Apr 2023, 12:57 Regarding the man in the middle debug script; I'm not skilled enough in bash/linux that I understand how to do this and honestly i wouldn't know what to google 😀 If this is relevant for you to understand in general, I'd be happy to try, but I would need a bit of guidance 😀
If you type filebot <args> on the command-line and you want to debug that, type /path/to/filebot-debug.sh <args> instead. /path/to/filebot-debug.sh is a shell script text file that you Save as... onto your machine and then chmod +x *.sh to make it executable.

Re: Issues when using mounted cifs

Posted: 09 Apr 2023, 15:56
by wizzd
Thanks for the clarifications.

I made the debug work. Unfortunately the file ends in the same place as the console output.

Code: Select all

CLONE: Inappropriate ioctl for device / Invalid cross-device link
Write [xattr:net.filebot.metadata] {"@type":"Episode","seriesName":"ABCD","season":18,"episode":22,"title":"ABCD","absolute":322,"airdate":{"year":2022,"month":10,"day":22},"id":2222,"group":"Season 18","seriesInfo":{"database":"TheMovieDB::TV","order":"Airdate","language":"en-US","type":"Scripted","id":1234,"name":"ABCD","aliasNames":["ABCD"],"certification":"TV-14","startDate":{"year":1234,"month":2,"day":6},"genres":["Animation","Comedy"],"spokenLanguages":["en"],"network":"FOX","rating":6.123,"ratingCount":1234,"runtime":22,"status":"Returning Series"}}
Exit Code: 0
I can pm the entire file to you if you want.

I'm a bit at a loss of what to try next. Maybe I just have to settle for the -no-xattr option...

Re: Issues when using mounted cifs

Posted: 09 Apr 2023, 16:04
by rednoah

Code: Select all

Write [xattr:net.filebot.metadata] ...
Exit Code: 0
Yep, that makes no sense. The filebot process definitely doesn't exit with code 0 at that point in our code. I would have expected a non-zero exit code and some sort of error message if something does awry in the OS or file system layer, but alas, nothing, very mysterious, no clue.

There's probably nothing you can do, and the next step would be checking with the CIFS developers and see if there's a way to get more debug logging for file system operations on that side of things.




EDIT:

:?: It would certainly be interesting to isolate the issue without filebot by reading / writing xattr with other commands:
ChatGPT wrote:
  • In Linux, you can use the setfattr command to set extended attributes (xattrs) on a file. Here's the basic syntax:

    Code: Select all

    setfattr -n attribute_name -v attribute_value file_path
  • Here's an example of how to set an xattr on a file:

    Code: Select all

    setfattr -n user.description -v "This is a sample file" sample.txt
    This sets the xattr named user.description with the value "This is a sample file" on the file sample.txt.
  • To view the xattrs of a file, you can use the getfattr command:

    Code: Select all

    getfattr -d file_path
    This command will display all xattrs of the file, including their names and values.
  • Note that not all file systems support xattrs, so if you're working with a file system that doesn't support xattrs, the setfattr and getfattr commands will not work.

Re: Issues when using mounted cifs

Posted: 09 Apr 2023, 17:28
by wizzd
I love that you used chatGPT 😀

Same file is present on both local and on mounted nas.
First i tried getfattr on both local and nas - there was no output.

Then i tried setfattr on local file - this worked and with getfattr on the file I could see the user.description set.

Then i tried setfattr on nas file. First it said

Code: Select all

Segmentation fault
Running it again, caused the vm to go to a hung type of state. I couldn't ctrl+anything to get out of the process. I logged into the vm using the proxmox console and did sudo reboot - but not even that worked. I had to stop the vm hard and start it again.

For sure doesn't seem like it's a filebot issue.

I'm no master in reading the syslog but I snipped this

Code: Select all

Apr  9 17:18:49 plex kernel: [   75.333618] detected buffer overflow in strncpy
Apr  9 17:18:49 plex kernel: [   75.333653] ------------[ cut here ]------------
Apr  9 17:18:49 plex kernel: [   75.333654] kernel BUG at lib/string.c:1165!
Apr  9 17:18:49 plex kernel: [   75.333669] invalid opcode: 0000 [#1] SMP PTI
Apr  9 17:18:49 plex kernel: [   75.333682] CPU: 2 PID: 1190 Comm: setfattr Not tainted 5.15.0-69-generic #76-Ubuntu
Apr  9 17:18:49 plex kernel: [   75.333701] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
Apr  9 17:18:49 plex kernel: [   75.333726] RIP: 0010:fortify_panic+0x13/0x15
Apr  9 17:18:49 plex kernel: [   75.333740] Code: bd e3 82 e8 ea bd fc ff 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc 55 48 89 fe 48 c7 c7 18 be e3 82 48 89 e5 e8 c8 bd fc ff <0f> 0b 41 0f b6 f5 48 c7 c7
 d0 4a 8c 83 e8 da 11 95 ff 48 8b 45 e0
Apr  9 17:18:49 plex kernel: [   75.333783] RSP: 0018:ffff9e3980f0fa58 EFLAGS: 00010246
Apr  9 17:18:49 plex kernel: [   75.333797] RAX: 0000000000000023 RBX: 0000000000000098 RCX: 0000000000000000
Apr  9 17:18:49 plex kernel: [   75.333815] RDX: 0000000000000000 RSI: ffff8cc2bdd20580 RDI: ffff8cc2bdd20580
Apr  9 17:18:49 plex kernel: [   75.333831] RBP: ffff9e3980f0fa58 R08: 0000000000000003 R09: 0000000000000001
Apr  9 17:18:49 plex kernel: [   75.333847] R10: 00000000ffffffff R11: ffffffffc03870e0 R12: ffff9e3980f0fd5d
Apr  9 17:18:49 plex kernel: [   75.333864] R13: ffff8cc250f1e800 R14: ffff8cc2537b0000 R15: 000000000000000b
Apr  9 17:18:49 plex kernel: [   75.333881] FS:  00007f4fe8c4d740(0000) GS:ffff8cc2bdd00000(0000) knlGS:0000000000000000
Apr  9 17:18:49 plex kernel: [   75.333899] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Apr  9 17:18:49 plex kernel: [   75.333913] CR2: 00007f4fe8d58b60 CR3: 000000002e406000 CR4: 00000000000006e0
Apr  9 17:18:49 plex kernel: [   75.333933] Call Trace:
Apr  9 17:18:49 plex kernel: [   75.333940]  <TASK>
Apr  9 17:18:49 plex kernel: [   75.333948]  CIFSSMBSetEA.cold+0xc/0x18 [cifs]
Apr  9 17:18:49 plex kernel: [   75.333996]  cifs_xattr_set+0x1b6/0x710 [cifs]
Apr  9 17:18:49 plex kernel: [   75.334039]  ? evm_protected_xattr_common+0x49/0xc0
Apr  9 17:18:49 plex kernel: [   75.334053]  __vfs_setxattr+0x6e/0x90
Apr  9 17:18:49 plex kernel: [   75.334065]  __vfs_setxattr_noperm+0x76/0x220
Apr  9 17:18:49 plex kernel: [   75.334077]  __vfs_setxattr_locked+0xe6/0x110
Apr  9 17:18:49 plex kernel: [   75.334089]  vfs_setxattr+0x94/0x170
Apr  9 17:18:49 plex kernel: [   75.334099]  do_setxattr+0x82/0xa0
Apr  9 17:18:49 plex kernel: [   75.334108]  setxattr+0xa0/0xc0
Apr  9 17:18:49 plex kernel: [   75.334117]  ? putname+0x59/0x70
Apr  9 17:18:49 plex kernel: [   75.334126]  ? kmem_cache_free+0x24f/0x290
Apr  9 17:18:49 plex kernel: [   75.334139]  ? putname+0x59/0x70
Apr  9 17:18:49 plex kernel: [   75.334148]  ? __cond_resched+0x1a/0x50
Apr  9 17:18:49 plex kernel: [   75.334159]  path_setxattr+0xc3/0xe0
Apr  9 17:18:49 plex kernel: [   75.334169]  __x64_sys_setxattr+0x2b/0x40
Apr  9 17:18:49 plex kernel: [   75.334179]  do_syscall_64+0x5c/0xc0
Apr  9 17:18:49 plex kernel: [   75.334190]  ? irqentry_exit_to_user_mode+0x9/0x20
Apr  9 17:18:49 plex kernel: [   75.334202]  ? irqentry_exit+0x1d/0x30
Apr  9 17:18:49 plex kernel: [   75.334212]  ? exc_page_fault+0x89/0x170
Apr  9 17:18:49 plex kernel: [   75.334222]  entry_SYSCALL_64_after_hwframe+0x61/0xcb
Apr  9 17:18:49 plex kernel: [   75.334235] RIP: 0033:0x7f4fe8d7239e
Apr  9 17:18:49 plex kernel: [   75.334246] Code: 48 8b 0d 95 6a 0f 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 bc 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 62 6a 0f 00 f7 d8 64 89 01 48
Apr  9 17:18:49 plex kernel: [   75.334287] RSP: 002b:00007ffe2edd9e18 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc
Apr  9 17:18:49 plex kernel: [   75.334305] RAX: ffffffffffffffda RBX: 00007ffe2eddb720 RCX: 00007f4fe8d7239e
Apr  9 17:18:49 plex kernel: [   75.334321] RDX: 0000562a674c9460 RSI: 00007ffe2eddb6f7 RDI: 00007ffe2eddb720
Apr  9 17:18:49 plex kernel: [   75.334337] RBP: 0000562a674c9474 R08: 0000000000000000 R09: 0000562a674c9460
Apr  9 17:18:49 plex kernel: [   75.334353] R10: 0000000000000014 R11: 0000000000000246 R12: 0000562a674c9460
Apr  9 17:18:49 plex kernel: [   75.334858] R13: 00007ffe2eddb71f R14: 00007ffe2eddb6f7 R15: 0000000000000100
Apr  9 17:18:49 plex kernel: [   75.335360]  </TASK>
Apr  9 17:18:49 plex kernel: [   75.335860] Modules linked in: cmac nls_utf8 cifs cifs_arc4 cifs_md4 fscache netfs binfmt_misc input_leds joydev serio_raw mac_hid qemu_fw_cfg sch_fq_codel dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua msr ramoops reed_solomon pstore_blk pstore_zone efi_pstore ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear bochs drm_vram_helper drm_ttm_helper ttm hid_generic drm_kms_helper syscopyarea sysfillrect sysimgblt usbhid fb_sys_fops cec hid virtio_net rc_core net_failover psmouse virtio_scsi drm failover i2c_piix4 pata_acpi floppy
Apr  9 17:18:49 plex kernel: [   75.338799] ---[ end trace 8fe3be9d971dd4f9 ]---
Apr  9 17:18:49 plex kernel: [   75.339378] RIP: 0010:fortify_panic+0x13/0x15
Apr  9 17:18:49 plex kernel: [   75.339949] Code: bd e3 82 e8 ea bd fc ff 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc 55 48 89 fe 48 c7 c7 18 be e3 82 48 89 e5 e8 c8 bd fc ff <0f> 0b 41 0f b6 f5 48 c7 c7 d0 4a 8c 83 e8 da 11 95 ff 48 8b 45 e0
Apr  9 17:18:49 plex kernel: [   75.340955] RSP: 0018:ffff9e3980f0fa58 EFLAGS: 00010246
Apr  9 17:18:49 plex kernel: [   75.341262] RAX: 0000000000000023 RBX: 0000000000000098 RCX: 0000000000000000
Apr  9 17:18:49 plex kernel: [   75.341575] RDX: 0000000000000000 RSI: ffff8cc2bdd20580 RDI: ffff8cc2bdd20580
Apr  9 17:18:49 plex kernel: [   75.341887] RBP: ffff9e3980f0fa58 R08: 0000000000000003 R09: 0000000000000001
Apr  9 17:18:49 plex kernel: [   75.342187] R10: 00000000ffffffff R11: ffffffffc03870e0 R12: ffff9e3980f0fd5d
Apr  9 17:18:49 plex kernel: [   75.342518] R13: ffff8cc250f1e800 R14: ffff8cc2537b0000 R15: 000000000000000b
Apr  9 17:18:49 plex kernel: [   75.342840] FS:  00007f4fe8c4d740(0000) GS:ffff8cc2bdd00000(0000) knlGS:0000000000000000
Apr  9 17:18:49 plex kernel: [   75.343137] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Apr  9 17:18:49 plex kernel: [   75.343483] CR2: 00007f4fe8d58b60 CR3: 000000002e406000 CR4: 00000000000006e0
(END)


Re: Issues when using mounted cifs

Posted: 09 Apr 2023, 17:40
by rednoah
Yep, that would be a low-level bug in the CIFS file system driver crashing the entire OS kernel. Please report the syslog above to the CIFS developers / maintainers. I can't read much, but it might allow them to pinpoint and fix the issue.

Re: Issues when using mounted cifs

Posted: 09 Apr 2023, 18:39
by wizzd
Agreed. I'll report it and stick to -no-xattr.
Thanks for all the help.