Bug#984698: closed by "Steinar H. Gunderson" (Re: Bug#984698: plocate: updatedb.plocate only indexes top directory of some xfs mounts)

2021-03-21 Thread Marcel Partap



[sorry, forgot to CC]

> The plot thickens; evidently, all of your files in /mnt/x are of type
> DT_UNKNOWN, where they should be DT_DIR or DT_REG. Is there anything strange
> about the filesystem on /mnt/x?


No, nothing I know of .. Inode size and sector size seem different between 
those XFSs that return unknown-type dir-entries and those that do not.. 
Probably more relevant: both of the former ones are V4 (which I see is now 
deprecated) and the ones not causing the issue are V5..
But mlocate's updatedb sees the same unknown type for dir entries and still 
continues to recurse...

Best Regards

[ THX for the fix! ]



Bug#984698: closed by "Steinar H. Gunderson" (Re: Bug#984698: plocate: updatedb.plocate only indexes top directory of some xfs mounts)

2021-03-21 Thread Steinar H. Gunderson
On Sun, Mar 21, 2021 at 01:04:49PM +0100, Marcel Partap wrote:
> [pid 2968895] openat(AT_FDCWD, "/mnt/x", O_RDONLY|O_NOATIME|O_DIRECTORY) = 6
> [pid 2968895] fstat(6, {st_dev=makedev(0x8, 0x22), st_ino=128, 
> st_mode=S_IFDIR|0777, st_nlink=34, st_uid=0, st_gid=0, st_blksize=4096, 
> st_blocks=8, st_size=4096, st_atime=0, st_atime_nsec=0, st_mtime=1615114025 
> /* 2021-03-07T11:47:05.236030621+0100 */, st_mtime_nsec=236030621, 
> st_ctime=1615114025 /* 2021-03-07T11:47:05.236030621+0100 */, 
> st_ctime_nsec=236030621}) = 0
> [...]
> [pid 2968895] getdents64(6, [{d_ino=128, d_off=4, d_reclen=24, 
> d_type=DT_UNKNOWN, d_name="*"}, [...] 

The plot thickens; evidently, all of your files in /mnt/x are of type
DT_UNKNOWN, where they should be DT_DIR or DT_REG. Is there anything strange
about the filesystem on /mnt/x?

/* Steinar */



Bug#984698: closed by "Steinar H. Gunderson" (Re: Bug#984698: plocate: updatedb.plocate only indexes top directory of some xfs mounts)

2021-03-21 Thread Marcel Partap

Ah thanks, I missed that reply in the vast stream.
Attached the output of

updatedb.plocate -U /mnt/x -o /run/shm/updatedb.plocate.db 2>&1|sed -r '/getdents64/ 
{:loop; s/(d_name="\**)[^"*]/\1*/};t loop'|tee updatedb.strace


Best Regards
MP
execve("/usr/sbin/updatedb.plocate", ["updatedb.plocate", "-U", "/mnt/x", "-o", 
"/run/shm/updatedb.plocate.db"], ["SHELL=/bin/bash", "LESS=-SRiMJj.2~ --shift 
5", "HISTCONTROL=ignoreboth:erasedups", "TMUX=/tmp//tmux-0/default,7300,0", 
"HISTSIZE=100", "LESS_TERMCAP_se=\33[23m\33[m\17", 
"LESS_TERMCAP_so=\33[1m\33[7m\33[32m\33[4"..., "LESS_TERMCAP_ZZ=\33[m\17", 
"EDITOR=vim", "LESS_TERMCAP_ZV=", "LESS_TERMCAP_ZW=", "LESS_TERMCAP_ZN=", 
"LESS_TERMCAP_ZO=", "PWD=/dev/shm", "LOGNAME=root", "RANGER_LEVEL=1", 
"XAUTHORITY=/home/empee584/.Xauth"..., "HOME=/root", "LANG=en_GB.UTF-8", 
"PROMPT_COMMAND=: ; _bash_history"..., "ESCDELAY=25", 
"SUMO_HOME=/usr/share/sumo", "ANDROID_HOME=/usr/lib/android-sd"..., 
"LESS_TERMCAP_mh=\33[2m\33[45m", "TERM=screen-256color", 
"LESS_TERMCAP_mb=\33[1m\33[35m", "LESS_TERMCAP_me=\33[m\17", 
"LESS_TERMCAP_md=\33[1m\33[36m", "LESS_TERMCAP_mr=\33[7m", "USER=root", 
"TMUX_PANE=%1663", "DISPLAY=:0.0", "SHLVL=1", "LESS_TERMCAP_ue=\33[m\17", 
"LESS_TERMCAP_us=\33[1m\33[35m", "SHELL_AUTOSTART=1", "SYSTEMD_LESS=-SRiMJj.2~ 
--shift "..., "CACA_DRIVER=ncurses", "XDG_DATA_DIRS=/root/.local/share"..., 
"PATH=/root/.local/bin:/usr/local"..., "HISTIGNORE=fg:bg:ls:curdirremove"..., 
"MAIL=/var/mail/root", "GOPATH=/usr/local/go", "_=/usr/bin/strace"]) = 0
brk(NULL)   = 0x56167090d000
access("/etc/ld.so.preload", R_OK)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_dev=makedev(0xfe, 0x1), st_ino=2760474, st_mode=S_IFREG|0644, 
st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=656, st_size=332395, 
st_atime=1615308075 /* 2021-03-09T17:41:15.136322436+0100 */, 
st_atime_nsec=136322436, st_mtime=1615308075 /* 
2021-03-09T17:41:15.136322436+0100 */, st_mtime_nsec=136322436, 
st_ctime=1615308075 /* 2021-03-09T17:41:15.140322452+0100 */, 
st_ctime_nsec=140322452}) = 0
mmap(NULL, 332395, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f969e2ef000
close(3)= 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libzstd.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, 
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\305\0\0\0\0\0\0"..., 832) = 
832
fstat(3, {st_dev=makedev(0xfe, 0x1), st_ino=4988491, st_mode=S_IFREG|0644, 
st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=1744, 
st_size=890800, st_atime=1610829920 /* 2021-01-16T21:45:20+0100 */, 
st_atime_nsec=0, st_mtime=1608920915 /* 2020-12-25T19:28:35+0100 */, 
st_mtime_nsec=0, st_ctime=1610829996 /* 2021-01-16T21:46:36.826083797+0100 */, 
st_ctime_nsec=826083797}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f969e2ed000
mmap(NULL, 892984, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f969e212000
mprotect(0x7f969e21d000, 843776, PROT_NONE) = 0
mmap(0x7f969e21d000, 765952, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0x7f969e21d000
mmap(0x7f969e2d8000, 73728, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 
0xc6000) = 0x7f969e2d8000
mmap(0x7f969e2eb000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd8000) = 0x7f969e2eb000
close(3)= 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, 
"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\240\t\0\0\0\0\0"..., 832) = 
832
fstat(3, {st_dev=makedev(0xfe, 0x1), st_ino=4981494, st_mode=S_IFREG|0644, 
st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=3656, 
st_size=1870824, st_atime=1610371213 /* 2021-01-11T14:20:13+0100 */, 
st_atime_nsec=0, st_mtime=1610278539 /* 2021-01-10T12:35:39+0100 */, 
st_mtime_nsec=0, st_ctime=1610371216 /* 2021-01-11T14:20:16.515680637+0100 */, 
st_ctime_nsec=515680637}) = 0
mmap(NULL, 1886208, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f969e045000
mmap(0x7f969e0db000, 901120, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x96000) = 0x7f969e0db000
mmap(0x7f969e1b7000, 303104, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 
0x172000) = 0x7f969e1b7000
mmap(0x7f969e201000, 57344, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bb000) = 0x7f969e201000
mmap(0x7f969e20f000, 10240, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f969e20f000
close(3)= 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\362\0\0\0\0\0\0"..., 
832) = 832
fstat(3, {st_dev=makedev(0xfe, 0x1), st_ino=5043488, st_mode=S_IFREG|0644, 
st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=2584, 
st_size=1321344, st_atime=1610829705 /* 2021-01-16T21:41:45+0100 */, 
st_atime_nsec=0, st_mtime=1609825662 /* 

Bug#984698: closed by "Steinar H. Gunderson" (Re: Bug#984698: plocate: updatedb.plocate only indexes top directory of some xfs mounts)

2021-03-21 Thread Steinar H. Gunderson
On Sun, Mar 21, 2021 at 10:47:11AM +0100, Marcel Partap wrote:
> And what was I supposed to answer to the question "Did anything happen
> here?" .. Yes, something did happen here obviously, as described in the
> original report. And I asked for any recommendations to how to debug this
> further, as it is definitely reproducible on my system.

Yes:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984698#10

/* Steinar */
-- 
Homepage: https://www.sesse.net/



Bug#984698: closed by "Steinar H. Gunderson" (Re: Bug#984698: plocate: updatedb.plocate only indexes top directory of some xfs mounts)

2021-03-21 Thread Marcel Partap

Good Morning,
uhm I'm in the middle of important exam preparations, so please excuse the 
latency.
And what was I supposed to answer to the question "Did anything happen here?" 
.. Yes, something did happen here obviously, as described in the original report. And I 
asked for any recommendations to how to debug this further, as it is definitely 
reproducible on my system.

Best Regards
MP