[Bug 15844] New: mount does not fully/properly read /proc/mounts
bugzilla at busybox.net
bugzilla at busybox.net
Sun Nov 5 00:50:20 UTC 2023
https://bugs.busybox.net/show_bug.cgi?id=15844
Bug ID: 15844
Summary: mount does not fully/properly read /proc/mounts
Product: Busybox
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: wuerfel-wahlzettel.02 at icloud.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
I think mount does not fully read /proc/mounts to find the device given a mount
point. This is needed for remounting. It seems like mount only reads the first
1024 bytes of /proc/mounts. Maybe it aborts the reading process for some
reason. I do not know for sure.
See below a strace and below the actual file.
/opt/timemachine # strace -e read=0,1,2,3,4 mount -o remount,rw
/opt/timemachine
execve("/bin/mount", ["mount", "-o", "remount,rw", "/opt/timemachine"],
0x7ffd6226e058 /* 10 vars */) = 0
arch_prctl(ARCH_SET_FS, 0x7f0147493b48) = 0
set_tid_address(0x7f0147493fb8) = 584
brk(NULL) = 0x5643f83c5000
brk(0x5643f83c7000) = 0x5643f83c7000
mmap(0x5643f83c5000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1,
0) = 0x5643f83c5000
mprotect(0x7f0147490000, 4096, PROT_READ) = 0
mprotect(0x5643f7e01000, 16384, PROT_READ) = 0
getuid() = 0
getuid() = 0
geteuid() = 0
open("/proc/mounts", O_RDONLY|O_LARGEFILE) = 3
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f01473f9000
read(3, "overlay / overlay rw,relatime,lo"..., 1024) = 1024
| 00000 6f 76 65 72 6c 61 79 20 2f 20 6f 76 65 72 6c 61 overlay / overla |
| 00010 79 20 72 77 2c 72 65 6c 61 74 69 6d 65 2c 6c 6f y rw,relatime,lo |
| 00020 77 65 72 64 69 72 3d 2f 76 61 72 2f 6c 69 62 2f werdir=/var/lib/ |
| 00030 64 6f 63 6b 65 72 2f 6f 76 65 72 6c 61 79 32 2f docker/overlay2/ |
| 00040 6c 2f 55 32 55 58 43 54 33 43 58 48 4a 45 47 43 l/U2UXCT3CXHJEGC |
| 00050 4e 49 36 52 33 56 59 37 46 54 54 51 3a 2f 76 61 NI6R3VY7FTTQ:/va |
| 00060 72 2f 6c 69 62 2f 64 6f 63 6b 65 72 2f 6f 76 65 r/lib/docker/ove |
| 00070 72 6c 61 79 32 2f 6c 2f 45 35 4d 50 54 35 44 45 rlay2/l/E5MPT5DE |
| 00080 56 4c 4b 57 44 59 35 4a 32 55 44 42 44 54 48 32 VLKWDY5J2UDBDTH2 |
| 00090 56 50 3a 2f 76 61 72 2f 6c 69 62 2f 64 6f 63 6b VP:/var/lib/dock |
| 000a0 65 72 2f 6f 76 65 72 6c 61 79 32 2f 6c 2f 42 4b er/overlay2/l/BK |
| 000b0 54 34 52 36 52 4c 55 32 4a 4f 5a 45 32 4a 42 59 T4R6RLU2JOZE2JBY |
| 000c0 35 58 55 5a 53 52 5a 45 3a 2f 76 61 72 2f 6c 69 5XUZSRZE:/var/li |
| 000d0 62 2f 64 6f 63 6b 65 72 2f 6f 76 65 72 6c 61 79 b/docker/overlay |
| 000e0 32 2f 6c 2f 4a 59 42 45 33 4d 51 58 4e 4f 4c 42 2/l/JYBE3MQXNOLB |
| 000f0 4a 5a 46 47 32 48 56 4f 4c 36 53 4e 58 4e 3a 2f JZFG2HVOL6SNXN:/ |
| 00100 76 61 72 2f 6c 69 62 2f 64 6f 63 6b 65 72 2f 6f var/lib/docker/o |
| 00110 76 65 72 6c 61 79 32 2f 6c 2f 49 4d 34 47 33 4d verlay2/l/IM4G3M |
| 00120 5a 52 48 53 4b 58 44 59 58 33 51 4d 34 52 37 42 ZRHSKXDYX3QM4R7B |
| 00130 36 48 41 58 2c 75 70 70 65 72 64 69 72 3d 2f 76 6HAX,upperdir=/v |
| 00140 61 72 2f 6c 69 62 2f 64 6f 63 6b 65 72 2f 6f 76 ar/lib/docker/ov |
| 00150 65 72 6c 61 79 32 2f 66 35 35 36 63 31 66 36 64 erlay2/f556c1f6d |
| 00160 66 61 31 38 39 39 31 32 65 66 38 37 30 34 32 37 fa189912ef870427 |
| 00170 36 63 64 37 63 30 61 30 39 38 39 36 39 65 62 61 6cd7c0a098969eba |
| 00180 33 39 32 32 30 61 32 64 31 64 30 36 34 32 65 65 39220a2d1d0642ee |
| 00190 30 37 62 37 30 64 61 2f 64 69 66 66 2c 77 6f 72 07b70da/diff,wor |
| 001a0 6b 64 69 72 3d 2f 76 61 72 2f 6c 69 62 2f 64 6f kdir=/var/lib/do |
| 001b0 63 6b 65 72 2f 6f 76 65 72 6c 61 79 32 2f 66 35 cker/overlay2/f5 |
| 001c0 35 36 63 31 66 36 64 66 61 31 38 39 39 31 32 65 56c1f6dfa189912e |
| 001d0 66 38 37 30 34 32 37 36 63 64 37 63 30 61 30 39 f8704276cd7c0a09 |
| 001e0 38 39 36 39 65 62 61 33 39 32 32 30 61 32 64 31 8969eba39220a2d1 |
| 001f0 64 30 36 34 32 65 65 30 37 62 37 30 64 61 2f 77 d0642ee07b70da/w |
| 00200 6f 72 6b 20 30 20 30 0a 70 72 6f 63 20 2f 70 72 ork 0 0.proc /pr |
| 00210 6f 63 20 70 72 6f 63 20 72 77 2c 6e 6f 73 75 69 oc proc rw,nosui |
| 00220 64 2c 6e 6f 64 65 76 2c 6e 6f 65 78 65 63 2c 72 d,nodev,noexec,r |
| 00230 65 6c 61 74 69 6d 65 20 30 20 30 0a 74 6d 70 66 elatime 0 0.tmpf |
| 00240 73 20 2f 64 65 76 20 74 6d 70 66 73 20 72 77 2c s /dev tmpfs rw, |
| 00250 6e 6f 73 75 69 64 2c 73 69 7a 65 3d 36 35 35 33 nosuid,size=6553 |
| 00260 36 6b 2c 6d 6f 64 65 3d 37 35 35 20 30 20 30 0a 6k,mode=755 0 0. |
| 00270 64 65 76 70 74 73 20 2f 64 65 76 2f 70 74 73 20 devpts /dev/pts |
| 00280 64 65 76 70 74 73 20 72 77 2c 6e 6f 73 75 69 64 devpts rw,nosuid |
| 00290 2c 6e 6f 65 78 65 63 2c 72 65 6c 61 74 69 6d 65 ,noexec,relatime |
| 002a0 2c 67 69 64 3d 35 2c 6d 6f 64 65 3d 36 32 30 2c ,gid=5,mode=620, |
| 002b0 70 74 6d 78 6d 6f 64 65 3d 36 36 36 20 30 20 30 ptmxmode=666 0 0 |
| 002c0 0a 73 79 73 66 73 20 2f 73 79 73 20 73 79 73 66 .sysfs /sys sysf |
| 002d0 73 20 72 77 2c 6e 6f 73 75 69 64 2c 6e 6f 64 65 s rw,nosuid,node |
| 002e0 76 2c 6e 6f 65 78 65 63 2c 72 65 6c 61 74 69 6d v,noexec,relatim |
| 002f0 65 20 30 20 30 0a 63 67 72 6f 75 70 20 2f 73 79 e 0 0.cgroup /sy |
| 00300 73 2f 66 73 2f 63 67 72 6f 75 70 20 63 67 72 6f s/fs/cgroup cgro |
| 00310 75 70 32 20 72 77 2c 6e 6f 73 75 69 64 2c 6e 6f up2 rw,nosuid,no |
| 00320 64 65 76 2c 6e 6f 65 78 65 63 2c 72 65 6c 61 74 dev,noexec,relat |
| 00330 69 6d 65 20 30 20 30 0a 6d 71 75 65 75 65 20 2f ime 0 0.mqueue / |
| 00340 64 65 76 2f 6d 71 75 65 75 65 20 6d 71 75 65 75 dev/mqueue mqueu |
| 00350 65 20 72 77 2c 6e 6f 73 75 69 64 2c 6e 6f 64 65 e rw,nosuid,node |
| 00360 76 2c 6e 6f 65 78 65 63 2c 72 65 6c 61 74 69 6d v,noexec,relatim |
| 00370 65 20 30 20 30 0a 73 68 6d 20 2f 64 65 76 2f 73 e 0 0.shm /dev/s |
| 00380 68 6d 20 74 6d 70 66 73 20 72 77 2c 6e 6f 73 75 hm tmpfs rw,nosu |
| 00390 69 64 2c 6e 6f 64 65 76 2c 6e 6f 65 78 65 63 2c id,nodev,noexec, |
| 003a0 72 65 6c 61 74 69 6d 65 2c 73 69 7a 65 3d 36 35 relatime,size=65 |
| 003b0 35 33 36 6b 20 30 20 30 0a 2f 2f 75 33 35 39 31 536k 0 0.//u1234 |
| 003c0 32 39 2e 79 6f 75 72 2d 73 74 6f 72 61 67 65 62 56.your-storageb |
| 003d0 6f 78 2e 64 65 2f 62 61 63 6b 75 70 2f 74 69 6d ox.de/backup/tim |
| 003e0 65 6d 61 63 68 69 6e 65 20 2f 73 74 6f 72 61 67 emachine /storag |
| 003f0 65 62 6f 78 20 63 69 66 73 20 72 77 2c 72 65 6c ebox cifs rw,rel |
write(2, "mount: can't find /opt/timemachi"..., 51mount: can't find
/opt/timemachine in /proc/mounts
) = 51
lseek(3, -504, SEEK_CUR) = 520
exit_group(1) = ?
+++ exited with 1 +++
/opt/timemachine # cat /proc/mounts
overlay / overlay
rw,relatime,lowerdir=/var/lib/docker/overlay2/l/U2UXCT3CXHJEGCNI6R3VY7FTTQ:/var/lib/docker/overlay2/l/E5MPT5DEVLKWDY5J2UDBDTH2VP:/var/lib/docker/overlay2/l/BKT4R6RLU2JOZE2JBY5XUZSRZE:/var/lib/docker/overlay2/l/JYBE3MQXNOLBJZFG2HVOL6SNXN:/var/lib/docker/overlay2/l/IM4G3MZRHSKXDYX3QM4R7B6HAX,upperdir=/var/lib/docker/overlay2/f556c1f6dfa189912ef8704276cd7c0a098969eba39220a2d1d0642ee07b70da/diff,workdir=/var/lib/docker/overlay2/f556c1f6dfa189912ef8704276cd7c0a098969eba39220a2d1d0642ee07b70da/work
0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,size=65536k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666 0
0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=65536k 0 0
//u123456.your-storagebox.de/backup/timemachine /storagebox cifs
rw,relatime,vers=3.1.1,cache=strict,username=u123456,uid=0,noforceuid,gid=0,noforcegid,addr=65.21.80.44,file_mode=0666,dir_mode=0777,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=1,actimeo=1,closetimeo=1
0 0
/dev/vda1 /run/samba ext4 rw,relatime,discard 0 0
/dev/vda1 /etc/resolv.conf ext4 rw,relatime,discard 0 0
/dev/vda1 /etc/hostname ext4 rw,relatime,discard 0 0
/dev/vda1 /etc/hosts ext4 rw,relatime,discard 0 0
/dev/vda1 /var/lib/samba ext4 rw,relatime,discard 0 0
/dev/vda1 /var/cache/samba ext4 rw,relatime,discard 0 0
/dev/loop0 /opt/timemachine ext4 ro,relatime 0 0
/opt/timemachine #
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list