Totem crashes repeatedly

I’m running Fedora 33 and everytime I connect my iphone to retrieve pictures from it I have repeated crashes from totem. It appears to be a ulimit issue as I get the following in dmesg:

[177274.268378] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[177274.268380] usb 3-2: Product: iPhone
[177274.268382] usb 3-2: Manufacturer: Apple Inc.
[177274.268383] usb 3-2: SerialNumber: 000080300011483C0A6B402E
[177274.398910] usbcore: registered new device driver apple-mfi-fastcharge
[177274.582758] ipheth 3-2:4.2: Apple iPhone USB Ethernet device attached
[177274.582784] usbcore: registered new interface driver ipheth
[177274.586571] ipheth 3-2:4.2 enp7s0f3u2c4i2: renamed from eth0
[177531.812849] mmap: multiqueue0:src (118178): **VmData 544251904 exceed data ulimit 540975076. Update limits or use boot option ignore_rlimit_data.**
[177531.812966] traps: multiqueue0:src[118178] trap int3 ip:7f9e2d5943e7 sp:7f9e1cc6fac0 error:0 in libglib-2.0.so.0.6600.8[7f9e2d556000+8b000]
[177536.838538] traps: multiqueue0:src[118382] trap int3 ip:7fb59295e3e7 sp:7fb582039720 error:0 in libglib-2.0.so.0.6600.8[7fb592920000+8b000]
[177540.667963] traps: multiqueue0:src[118553] trap int3 ip:7f5e35f233e7 sp:7f5e255fe720 error:0 in libglib-2.0.so.0.6600.8[7f5e35ee5000+8b000]
[177543.393730] traps: multiqueue0:src[118604] trap int3 ip:7f33f531e3e7 sp:7f33e49f9720 error:0 in libglib-2.0.so.0.6600.8[7f33f52e0000+8b000]
[177655.203349] traps: multiqueue0:src[121546] trap int3 ip:7f35da9313e7 sp:7f35ca00cac0 error:0 in libglib-2.0.so.0.6600.8[7f35da8f3000+8b000]
[177658.892076] traps: appsrc0:src[121739] trap int3 ip:7fc5c73263e7 sp:7fc537ffe570 error:0 in libglib-2.0.so.0.6600.8[7fc5c72e8000+8b000]
[177680.149258] traps: multiqueue0:src[122427] trap int3 ip:7fe974df13e7 sp:7fe957ffd720 error:0 in libglib-2.0.so.0.6600.8[7fe974db3000+8b000]
[177694.475538] traps: multiqueue0:src[122909] trap int3 ip:7f4bae42a3e7 sp:7f4b9db05720 error:0 in libglib-2.0.so.0.6600.8[7f4bae3ec000+8b000]
[177697.401373] traps: multiqueue0:src[122952] trap int3 ip:7f23cf20d3e7 sp:7f23be8e8ac0 error:0
[177704.663271] traps: multiqueue0:src[123287] trap int3 ip:7fc7137de3e7 sp:7fc702eb9720 error:0 in libglib-2.0.so.0.6600.8[7fc7137a0000+8b000]
[177711.686276] traps: multiqueue0:src[123558] trap int3 ip:7fad4c4083e7 sp:7fad377fcac0 error:0 in libglib-2.0.so.0.6600.8[7fad4c3ca000+8b000]
[177714.434788] traps: multiqueue0:src[123598] trap int3 ip:7f9f98c153e7 sp:7f9f7bffd720 error:0 in libglib-2.0.so.0.6600.8[7f9f98bd7000+8b000]
[177717.113616] traps: multiqueue0:src[123731] trap int3 ip:7f543cc063e7 sp:7f541fffdac0 error:0 in libglib-2.0.so.0.6600.8[7f543cbc8000+8b000]
[177719.828087] traps: multiqueue0:src[123867] trap int3 ip:7fb3073cd3e7 sp:7fb2f6aa8720 error:0 in libglib-2.0.so.0.6600.8[7fb30738f000+8b000]
[177762.766469] traps: multiqueue0:src[125323] trap int3 ip:7f8fab5003e7 sp:7f8f9abdbac0 error:0 in libglib-2.0.so.0.6600.8[7f8fab4c2000+8b000]
[177787.050594] traps: multiqueue0:src[126148] trap int3 ip:7f1406e083e7 sp:7f13f64e3720 error:0 in libglib-2.0.so.0.6600.8[7f1406dca000+8b000]
[177791.182275] traps: multiqueue0:src[126309] trap int3 ip:7f41e8a053e7 sp:7f41cbffd720 error:0 in libglib-2.0.so.0.6600.8[7f41e89c7000+8b000]

The error:0 entries go on and on.

When I check ulimit with “ulimit -Hn” and “ulimit -Sn” I get 524288 and 1024 respectively. My system has 32G memory so increasing the ulimit should not be a problem in my way of thinking (but I could be wrong), so how do I increase the ulimit and not have to mess with rebooting with the “ignore_rlimit_data” boot parameter?

Thanks

The default values are in /etc/systemd/system.conf
#DefaultLimitNOFILE=1024:524288

Most of this is documented in man systemd.system.conf

You would want to create an additional directory:
sudo mkdir /etc/systemd/system.conf.d

And then as root, create a file in that directory:
I called mine 10-nofile.conf, it contained.

[Manager]
DefaultLimitNOFILE=1024:1048576

and then reboot.

To remove the changes remove the file.

First, Thanks for the reply!

My system doesn’t appear to have a man page for systemd.system.conf:
<$ man -K 5 systemd.system.conf
No manual entry for systemd.system.conf in section 5/>
Or any other man section, I have man-pages.noarch 5.07-3.fc33 installed.

I’m confused as to what the values of soft and hard limits should be. The system now shows Hard value 524288 and soft value 1024 but VmData says 544251904 files to open and limit of 540975076. Those numbers aren’t understandable with the hard and soft limit numbers. I was thinking of increasing the current limits by a factor of 4 but not sure how that translates to the VmData message.

There seems to be multiple places where you can set the nofiles limits, /etc/security/limits.conf, shell command ulimit -n, or as you point out /etc/systemd/system; which is the best way? It appears that in /etc/security/limits.conf you can just set your preference in that file on a per user basis or for all users. Also the /etc/systemd/system/system.conf has entries for nofiles which appear to be system wide.

Not arguing with what you have provided, just confused as to why so many ways to accomplish this task. I come from an environment of Solaris, system 5 unix background from a decade ago where it was very straight forward with the ulimit command to adjust those limits.

Again thanks and I’m in the process of following your suggested method. I’ll let you know the outcome, the above questions came to mind as needing answered to help me understand the overall design plan.

I have made the suggested change.

Blockquote[root@odyssey: /etc/systemd/system.conf.d ]
SU: # cat 10-nofile.conf
[Manager]
DefaultLimitNOFILE=4096:4194304

[root@odyssey: /etc/systemd/system.conf.d ]
SU: # ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 127849
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 127849
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[root@odyssey: /etc/systemd/system.conf.d ]
SU: # ulimit -Hn
4194304
[root@odyssey: /etc/systemd/system.conf.d ]
SU: # ulimit -Sn
1024
[root@odyssey: /etc/systemd/system.conf.d ]
SU: #

Blockquote

As you can see the hard limit seems to have changed but the soft limit stayed the same. I need to do further testing to see if I can now retrieve the photos from my phone. Let you know!

ack …
man systemd system.conf
(sorry for the typo)

systemd does not utilize /etc/security/limits.conf

Additional references:
https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html
https://www.freedesktop.org/software/systemd/man/systemd-user.conf.html

Hope that helps

Well the final test was to use gthumb to import the pictures from phone, with no success. System performance was better in that it took longer to start complaining. Monitoring system performance with “System Monitor” I reached 40% CPU (16 core processor) utilization using all 32 threads and 29.7GB of memory used and somewhere along there I started getting totem crash reports. Checking dmesg I see:

[ 2774.730853] mmap: multiqueue0:src (96021): VmData 541433856 exceed data ulimit 541310320. Update limits or use boot option ignore_rlimit_data.
[ 2774.731016] show_signal: 1 callbacks suppressed
[ 2774.731017] traps: multiqueue0:src[96021] trap int3 ip:7fec84a533e7 sp:7fec67ffd720 error:0 in libglib-2.0.so.0.6600.8[7fec84a15000+8b000]
[ 2779.954212] traps: multiqueue0:src[96157] trap int3 ip:7f991d29f3e7 sp:7f990c97a720 error:0 in libglib-2.0.so.0.6600.8[7f991d261000+8b000]

After the totem crashes the import stops but System Monitor show lots of CPU activity and memory above 29GB used along with 10GB swap.

There are 1210 photos and videos in the folder I’m trying to import. This has been a good exercise of my system but totem seems to have problems. If I increase the number of open files more then I may not have enough memory (which I never thought I would say with 32GB).

From what dmesg via VmData reports it doesn’t look like I changed ulimit much. Still confused about the numbering scheme used. I thought it was a straight number of files, obviously not the case.