From mboxrd@z Thu Jan 1 00:00:00 1970 X-Received: by 10.182.248.227 with SMTP id yp3mr61164068obc.22.1426408933056; Sun, 15 Mar 2015 01:42:13 -0700 (PDT) X-BeenThere: voidlinux@googlegroups.com Received: by 10.140.18.102 with SMTP id 93ls2350021qge.54.gmail; Sun, 15 Mar 2015 01:42:12 -0700 (PDT) X-Received: by 10.140.42.23 with SMTP id b23mr853894qga.23.1426408932882; Sun, 15 Mar 2015 01:42:12 -0700 (PDT) Date: Sun, 15 Mar 2015 01:42:12 -0700 (PDT) From: =?UTF-8?Q?Christer_Sj=C3=B6holm?= To: voidlinux@googlegroups.com Message-Id: <82138bd6-c34c-417a-ae77-5134ed269b8a@googlegroups.com> Subject: cannot access to pkgdb: Bad file descriptor MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2364_1780761353.1426408932496" ------=_Part_2364_1780761353.1426408932496 Content-Type: multipart/alternative; boundary="----=_Part_2365_1923955279.1426408932496" ------=_Part_2365_1923955279.1426408932496 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, got a problem I can't get my head around. After a update and reboot a while ago (March 7), all xbps commands that try to read the pkgdb exits with: ERROR: cannot access to pkgdb: Bad file descriptor I have both swiched filesystem, var was on a f2fs partition, and moved the pkgdb to another void machine but the error persists. So it looks like it is corrupted some way that causes the problem. Looking inside it at least the begining and end looks like correct XML. Has anyone else has this problem, or know what it can be? If not, any ideas about how to go about recreating the pkgdb? My pkgdb can be seen here: https://gist.githubusercontent.com/christer/25f40aa5c546c7742a68/raw/pkgdb-0.38.plist And here is the end of an strace of xbps-query -l access("/etc/xbps.d/xbps.conf", R_OK) = -1 ENOENT (No such file or directory) open("/usr/share/xbps.d/xbps.conf", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=3194, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b54bc0000 read(3, "# Configuration file for XBPS.\n#"..., 4096) = 3194 read(3, "", 4096) = 0 close(3) = 0 munmap(0x7f8b54bc0000, 4096) = 0 chdir("/home/hcs/temp/strace-4.9_1.x86_64/usr/bin") = 0 open("/var/db/xbps/pkgdb-0.38.plist", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=1613824, ...}) = 0 mmap(NULL, 1617920, PROT_READ, MAP_SHARED, 3, 0) = 0x7f8b54a20000 close(3) = 0 madvise(0x7f8b54a20000, 1613824, MADV_SEQUENTIAL) = 0 mmap(0x7f8b54baa000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED, -1, 0) = -1 EBADF (Bad file descriptor) munmap(0x7f8b54a20000, 1613824) = 0 write(2, "ERROR: ", 7ERROR: ) = 7 write(2, "cannot access to pkgdb: Bad file"..., 44cannot access to pkgdb: Bad file descriptor ) = 44 ioctl(1, TIOCGWINSZ, {ws_row=69, ws_col=255, ws_xpixel=0, ws_ypixel=0}) = 0 exit_group(9) = ? +++ exited with 9 +++ ------=_Part_2365_1923955279.1426408932496 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi, got a problem I can't get my head around.

After= a update and reboot a while ago (March 7), all xbps commands that try to r= ead the pkgdb exits with:

ERROR: cannot access to pkgdb: Bad file de= scriptor

I have both swiched filesystem, var was on a f2fs partition= , and moved the pkgdb to another void machine but the error persists. So it= looks like it is corrupted some way that causes the problem.
Looking in= side it at least the begining and end looks like correct XML.

Has an= yone else has this problem, or know what it can be?
If not, any ideas ab= out how to go about recreating the pkgdb?


My pkgdb can be seen h= ere:     https://gist.githubusercontent.com/christer/25= f40aa5c546c7742a68/raw/pkgdb-0.38.plist


And here is the end of a= n strace of xbps-query -l

access("/etc/xbps.d/xbps.conf", R_OK) = ;  =3D -1 ENOENT (No such file or directory)
open("/usr/share/xbps.= d/xbps.conf", O_RDONLY) =3D 3
fstat(3, {st_mode=3DS_IFREG|0644, st_size= =3D3194, ...}) =3D 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|= MAP_ANONYMOUS, -1, 0) =3D 0x7f8b54bc0000
read(3, "# Configuration file f= or XBPS.\n#"..., 4096) =3D 3194
read(3, "", 4096)    = ;            &n= bsp;      =3D 0
close(3)    = ;            &n= bsp;            = ;   =3D 0
munmap(0x7f8b54bc0000, 4096)    =         =3D 0
chdir("/home/hcs/temp/s= trace-4.9_1.x86_64/usr/bin") =3D 0
open("/var/db/xbps/pkgdb-0.38.plist",= O_RDONLY) =3D 3
fstat(3, {st_mode=3DS_IFREG|0644, st_size=3D1613824, ..= .}) =3D 0
mmap(NULL, 1617920, PROT_READ, MAP_SHARED, 3, 0) =3D 0x7f8b54a= 20000
close(3)         &nbs= p;            &= nbsp;         =3D 0
madvise(0x7f= 8b54a20000, 1613824, MADV_SEQUENTIAL) =3D 0
mmap(0x7f8b54baa000, 4096, P= ROT_READ, MAP_PRIVATE|MAP_FIXED, -1, 0) =3D -1 EBADF (Bad file descriptor)<= br>munmap(0x7f8b54a20000, 1613824)       = ;  =3D 0
write(2, "ERROR: ", 7ERROR: )     = ;             = =3D 7
write(2, "cannot access to pkgdb: Bad file"..., 44cannot access to= pkgdb: Bad file descriptor
) =3D 44
ioctl(1, TIOCGWINSZ, {ws_row=3D6= 9, ws_col=3D255, ws_xpixel=3D0, ws_ypixel=3D0}) =3D 0
exit_group(9) = ;            &n= bsp;            = ; =3D ?
+++ exited with 9 +++

------=_Part_2365_1923955279.1426408932496-- ------=_Part_2364_1780761353.1426408932496--