Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] revdep-rebuild failing after SD-card corruption
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
christoph_peter_s
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2015
Posts: 108

PostPosted: Sat Jun 20, 2020 7:06 am    Post subject: [solved] revdep-rebuild failing after SD-card corruption Reply with quote

PS: OMG... I seemed to have garbled copying the old card to the new one... there really is an directory /usr/bin/bin, which contains a lot of old stuff. I have to clean this up. And a lot of stuff, I tried to rebuild also used that old junk...
Sorry for the noise. I spend so much time, looking at my mistake without seeing it.
Maybe the admins just delete it...


Dear Gentoo fellows,

I have the feeling, that I am not able to clean up one of my Raspis after a failing SD-card. The card produced lots of file system errors, so I tried to fix it as much as possible by fsck -y /dev/sdb2 on a AMD64 box. Then I did rebuild the system natively by emerge -e @world. In fact I did this twice, as I wanted to be sure, that there wasn't any hidden issues within the tool chain.

But while everything else looks fine to me, there is a persistent issue with revdep-rebuild:
Code:
brutus /etc/env.d # revdep-rebuild -v --debug
 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please file bugs at: https://bugs.gentoo.org/
        main(), _libs_to_check = set()
        all_masks:

                /lib/modules
                /lib32/modules
                /lib64/modules
                libjava.so
                libjvm.so
                libodbc.so
                libodbcinst.so
 * Found a valid cache, skipping collecting phase
        analyse(), Found 6172 libraries (+929 symlinks) and 6103 binaries
 * Scanning files
        scan(), scanelf params = ['-BF', '%F;%f;%S;%n;%M'], # files: 6178
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.7/revdep-rebuild", line 40, in <module>
    success = rebuild.main(rebuild.parse_options())
  File "/usr/lib/python3.7/site-packages/gentoolkit/revdep_rebuild/rebuild.py", line 150, in main
    _libs_to_check=_libs_to_check)
  File "/usr/lib/python3.7/site-packages/gentoolkit/revdep_rebuild/analyse.py", line 380, in analyse
    logger, searchbits)
  File "/usr/lib/python3.7/site-packages/gentoolkit/revdep_rebuild/analyse.py", line 38, in scan_files
    libs_and_bins, cmd_max_args, logger)
  File "/usr/lib/python3.7/site-packages/gentoolkit/revdep_rebuild/stuff.py", line 47, in scan
    ['scanelf'] + params + _files[i:i+max_args]).strip().split('\n')
  File "/usr/lib/python3.7/site-packages/gentoolkit/revdep_rebuild/stuff.py", line 25, in call_program
    stdout = stdout.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 27013-27014: invalid continuation byte


Of course I did redo the procedures of the "Localization Guide" in the wiki - but no success. I also tried to find, the offending file by using strace...

Code:
strace revdep-rebuild -v --debug

...

read(3, "/usr/bin/bin/pcregrep;pcregrep;;"..., 32768) = 565
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLIN}])
read(3, "/usr/bin/bin/pidof;pidof;;libpro"..., 32768) = 590
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLIN}])
read(3, "/usr/bin/bin/post-grohtml;post-g"..., 32768) = 857
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLIN}])
read(3, "/usr/bin/bin/ptx;ptx;;libc.so.6,"..., 32768) = 128
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLHUP}])
read(3, "", 32768)                      = 0
close(3)                                = 0
poll([{fd=5, events=POLLIN}], 1, -1)    = 1 ([{fd=5, revents=POLLHUP}])
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1104, si_uid=0, si_status=0, si_utime=0, si_stime=6} ---
read(5, "", 32768)                      = 0
close(5)                                = 0
wait4(1104, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 1104
brk(0x1be3000)                          = 0x1be3000
write(2, "Traceback (most recent call last"..., 35Traceback (most recent call last):
) = 35
write(2, "  File \"/usr/lib/python-exec/pyt"..., 77  File "/usr/lib/python-exec/python3.7/revdep-rebuild", line 40, in <module>
) = 77
openat(AT_FDCWD, "/usr/lib/python-exec/python3.7/revdep-rebuild", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0755, st_size=1365, ...}) = 0
ioctl(3, TCGETS, 0x7ecd7748)            = -1 ENOTTY (Inappropriate ioctl for device)
_llseek(3, 0, [0], SEEK_CUR)            = 0
fcntl64(3, F_DUPFD_CLOEXEC, 0)          = 4
fcntl64(4, F_GETFL)                     = 0x20000 (flags O_RDONLY|O_LARGEFILE)
fstat64(4, {st_mode=S_IFREG|0755, st_size=1365, ...}) = 0
read(4, "#!/usr/bin/python3.7\n#\n# Copyrig"..., 4096) = 1365
close(4)                                = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "#!/usr/bin/python3.7\n#\n# Copyrig"..., 8192) = 1365
close(3)                                = 0
write(2, "    success = rebuild.main(rebui"..., 52    success = rebuild.main(rebuild.parse_options())
) = 52
write(2, "  File \"/usr/lib/python3.7/site-"..., 98  File "/usr/lib/python3.7/site-packages/gentoolkit/revdep_rebuild/rebuild.py", line 150, in main
) = 98


I then tried to rebuild the package, containing the file from the last read (here /usr/bin/ptx -> sys-apps/coreutils). This changes the strace output...

Code:
strace revdep-rebuild -v
...
read(3, "/usr/bin/bin/preconv;preconv;;li"..., 32768) = 313
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLIN}])
read(3, "/usr/bin/bin/pslog;pslog;;libc.s"..., 32768) = 373
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLHUP}])
read(3, "", 32768)                      = 0
close(3)                                = 0
poll([{fd=5, events=POLLIN}], 1, -1)    = 1 ([{fd=5, revents=POLLHUP}])
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=23044, si_uid=0, si_status=0, si_utime=3, si_stime=4} ---
read(5, "", 32768)                      = 0
close(5)                                = 0
wait4(23044, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 23044
write(2, "Traceback (most recent call last"..., 35Traceback (most recent call last):
) = 35
write(2, "  File \"/usr/lib/python-exec/pyt"..., 77  File "/usr/lib/python-exec/python3.7/revdep-rebuild", line 40, in <module>
) = 77


... so that I repeated the procedure by rebuilding sys-process/psmisc. But this only results in:

Code:
read(3, "/usr/bin/bin/pidof;pidof;;libpro"..., 32768) = 590
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLIN}])
read(3, "/usr/bin/bin/post-grohtml;post-g"..., 32768) = 541
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLIN}])
read(3, "/usr/bin/bin/prtstat;prtstat;;li"..., 32768) = 444
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLHUP}])
read(3, "", 32768)                      = 0
close(3)                                = 0
poll([{fd=5, events=POLLIN}], 1, -1)    = 1 ([{fd=5, revents=POLLHUP}])
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=26834, si_uid=0, si_status=0, si_utime=0, si_stime=8} ---
read(5, "", 32768)                      = 0
close(5)                                = 0
wait4(26834, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 26834
brk(0x21d0000)                          = 0x21d0000


This seems to point at /usr/bin/prtstat - but this is part of sys-process/psmisc, which I just did rebuild. So apparently I don't understand, what's going on. And what I need to do, to ultimatively clean up the system. Needless to say, that I also tried to delete revdep-rebuild's cache. And I did the mentioned second emerge -e @world, that did also not improve the situation.

So to me it looks like there were still some remains of the crashed SD-card, that I unwillingly copied to the new one. But I don't know how to find them... Maybe some of You can give me directions for the further search.

Best regards
Peter
Back to top
View user's profile Send private message
guitou
Guru
Guru


Joined: 02 Oct 2003
Posts: 534
Location: France

PostPosted: Sat Jun 20, 2020 6:16 pm    Post subject: Reply with quote

Hello.

Quote:
PS: OMG...


Completely off topic: not at all a football (soccer) fan, but I definitely had a hard time wondering why you were talking about PSG OM ^^

Edit: might be completely misleading, just a wild guess, but seeing this:
Code:
* Found a valid cache, skipping collecting phase


Is it possible that this cache should be wiped out before retrying?

++
Gi)
Back to top
View user's profile Send private message
christoph_peter_s
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2015
Posts: 108

PostPosted: Sat Jun 20, 2020 7:40 pm    Post subject: Reply with quote

Hm, to clarify that "OMG"...

Code:
read(3, "/usr/bin/bin/ptx;ptx;;libc.so.6,"..., 32768) = 128


The box was so kaputt, that I had to copy a lot of binaries to revive it. And I was cautious enough, to copy the old /bin directory to /bin/bin - and then I didn't have the time to fix it for a couple of weeks - and did forget about these crappy copies. And revdep-rebuild stumbled over a few of them...

If I had remembered having copied that stuff, then the strace information should have guided me immediately to the problem. So the lesson in that is, that one should read all messages completely - and with care.

I am really a bit humiliated by this case. I struggled a few days with it - and minutes after I wrote the requrest for help here, it became clear, what happened...

Best regards
Peter


Last edited by christoph_peter_s on Sat Jun 20, 2020 9:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
guitou
Guru
Guru


Joined: 02 Oct 2003
Posts: 534
Location: France

PostPosted: Sat Jun 20, 2020 9:25 pm    Post subject: Reply with quote

Hmm, looks like you managed to help yourself quite well, nothing to be ashamed of, on the contrary! ;)

++
Gi)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum