Package: reprepro Version: 3.4.1-1 Severity: normal Tags: patch Using copysrc to copy some files that are /already/ in the destination repo:
----------------------------
[EMAIL PROTECTED]:~/apt$ cat conf/updatehook
#!/bin/sh
exit 0
[EMAIL PROTECTED]:~/apt$ reprepro -V copysrc prod-sarge dvl-sarge
bds-triton-cert
Adding 'bds-triton-cert' '3.1~test1' to 'prod-sarge|bds|i386'.
Warning: downgrading 'bds-triton-cert' from '3.1~test1' to '3.1~test1' in
'prod-sarge|bds|i386'!
Adding 'bds-triton-cert' '3.1~test1' to 'prod-sarge|bds|amd64'.
Warning: downgrading 'bds-triton-cert' from '3.1~test1' to '3.1~test1' in
'prod-sarge|bds|amd64'!
Adding 'bds-triton-cert' '3.1~test1' to 'prod-sarge|bds|source'.
Warning: downgrading 'bds-triton-cert' from '3.1~test1' to '3.1~test1' in
'prod-sarge|bds|source'!
Notification process '/home/repo/apt/conf/updatehook' killed with signal 11!
Segmentation fault
----------------------------
Analysis (getting gdb to follow the right child process):
----------------------------
0xa7cfb53b in strlen () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0 0xa7cfb53b in strlen () from /lib/tls/i686/cmov/libc.so.6
#1 0xa7cadb6a in putenv () from /lib/tls/i686/cmov/libc.so.6
#2 0xa7cadf03 in setenv () from /lib/tls/i686/cmov/libc.so.6
#3 0x0805c296 in startchild () at log.c:567
#4 0x0805cf87 in notificator_enqueue (n=0x80b75f0, target=0x80b77b8,
name=0x80cb368 "bds-triton-cert", version=0x80cbc60 "3.1~test1",
oldversion=0x80cb0e0 "3.1~test1",
control=0x80cec78 "Package: bds-triton-cert\nFormat: 1.0\nVersion:
3.1~test1\nBinary: bds-triton-cert\nMaintainer: paul cannon <[EMAIL
PROTECTED]>\nArchitecture: all\nStandards-Version: 3.6.1\nBuild-Depends:
debhelper (>= "...,
oldcontrol=0x80c69d8 "Package: bds-triton-cert\nFormat: 1.0\nVersion:
3.1~test1\nBinary: bds-triton-cert\nMaintainer: paul cannon <[EMAIL
PROTECTED]>\nArchitecture: all\nStandards-Version: 3.6.1\nBuild-Depends:
debhelper (>= "..., filekeys=0x80cb350,
oldfilekeys=0xafd594d0, renotification=false) at log.c:848
#5 0x0805d5d3 in logger_log (log=0x80b7108, target=0x80b77b8,
name=0x80cb368 "bds-triton-cert", version=0x80cbc60 "3.1~test1",
oldversion=0x80cb0e0 "3.1~test1",
control=0x80cec78 "Package: bds-triton-cert\nFormat: 1.0\nVersion:
3.1~test1\nBinary: bds-triton-cert\nMaintainer: paul cannon <[EMAIL
PROTECTED]>\nArchitecture: all\nStandards-Version: 3.6.1\nBuild-Depends:
debhelper (>= "...,
oldcontrol=0x80c69d8 "Package: bds-triton-cert\nFormat: 1.0\nVersion:
3.1~test1\nBinary: bds-triton-cert\nMaintainer: paul cannon <[EMAIL
PROTECTED]>\nArchitecture: all\nStandards-Version: 3.6.1\nBuild-Depends:
debhelper (>= "..., filekeys=0x80cb350,
oldfilekeys=0xafd594d0) at log.c:1021
#6 0x08083eb7 in addpackages (target=0x80b77b8, database=0x80b9250,
packagename=0x80cb368 "bds-triton-cert",
controlchunk=0x80cec78 "Package: bds-triton-cert\nFormat: 1.0\nVersion:
3.1~test1\nBinary: bds-triton-cert\nMaintainer: paul cannon <[EMAIL
PROTECTED]>\nArchitecture: all\nStandards-Version: 3.6.1\nBuild-Depends:
debhelper (>= "...,
oldcontrolchunk=0x80c69d8 "Package: bds-triton-cert\nFormat: 1.0\nVersion:
3.1~test1\nBinary: bds-triton-cert\nMaintainer: paul cannon <[EMAIL
PROTECTED]>\nArchitecture: all\nStandards-Version: 3.6.1\nBuild-Depends:
debhelper (>= "...,
version=0x80cbc60 "3.1~test1", oldversion=0x80cb0e0 "3.1~test1",
files=0x80cb350,
oldfiles=0xafd594d0, logger=0x80b7108, dereferencedfilekeys=0xafd59680,
trackingdata=0x0, filetype=ft_SOURCE, oldsource=0x0, oldsversion=0x0) at
target.c:349
#7 0x080843ff in target_addpackage (target=0x80b77b8, logger=0x80b7108,
database=0x80b9250, name=0x80cb368 "bds-triton-cert", version=0x80cbc60
"3.1~test1",
control=0x80cec78 "Package: bds-triton-cert\nFormat: 1.0\nVersion:
3.1~test1\nBinary: bds-triton-cert\nMaintainer: paul cannon <[EMAIL
PROTECTED]>\nArchitecture: all\nStandards-Version: 3.6.1\nBuild-Depends:
debhelper (>= "..., filekeys=0x80cb350,
usedmarker=0x0, downgrade=true, dereferencedfilekeys=0xafd59680,
trackingdata=0x0,
filetype=ft_SOURCE) at target.c:451
#8 0x0804b116 in package_add (database=0x80b9250, into=0x80b7330, tracks=0x0,
target=0x80b77b8, package=0x80cb328, dereferencedfilekeys=0xafd59680)
at copypackages.c:276
#9 0x0804b286 in packagelist_add (database=0x80b9250, into=0x80b7330,
list=0xafd595e4,
dereferencedfilekeys=0xafd59680) at copypackages.c:322
#10 0x0804b9e1 in copy_by_source (database=0x80b9250, into=0x80b7330,
from=0x80b7e20,
argc=1, argv=0xafd59828, component=0x0, architecture=0x0, packagetype=0x0,
dereferenced=0xafd59680) at copypackages.c:505
#11 0x0808a957 in action_d_y_n_copysrc (alldistributions=0x80b7330,
database=0x80b9250,
dereferenced=0xafd59680, dummy_section=0x0, dummy_priority=0x0,
architecture=0x0,
component=0x0, packagetype=0x0, argc=4, argv=0xafd5981c) at main.c:1233
#12 0x0808dde8 in callaction (action=0x80b0358, argc=4, argv=0xafd5981c) at
main.c:2557
#13 0x0808f57b in main (argc=6, argv=0xafd59814) at main.c:3151
(gdb) up
#1 0xa7cadb6a in putenv () from /lib/tls/i686/cmov/libc.so.6
(gdb) up
#2 0xa7cadf03 in setenv () from /lib/tls/i686/cmov/libc.so.6
(gdb) up
#3 0x0805c296 in startchild () at log.c:567
567 setenv("REPREPRO_CAUSING_FILE", p->causingfile,
true);
(gdb) p p->causingfile
$4 = 0x632d6e6f <Address 0x632d6e6f out of bounds>
----------------------------
Looks like when notification_process instances are created (log.c:826), they
aren't zeroed, and if there isn't a causingfile, that member never gets set
(for standard notification processes only. Notification processes for
.changes files do properly set it to 0 in this case).
Short patch:
============================
--- log.c 2008-04-13 04:43:09.000000000 -0600
+++ ../log.c 2008-05-12 18:14:54.000000000 -0600
@@ -833,7 +833,8 @@
free(p);
return RET_ERROR_OOM;
}
- }
+ } else
+ p->causingfile = NULL;
p->arguments = arguments;
p->next = NULL;
p->child = 0;
============================
--
paul
(Yeah, I know I suck for investigating this bug on an oldstable machine
with backports scattered around, but it was the only convenient place.
Pretty sure the bug is still valid anywhere else.)
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.17-2-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages reprepro depends on:
ii libarchive1 1.2.53-2etch1~bpo31+1 Single library to read/write tar,
ii libbz2-1.0 1.0.2-7 high-quality block-sorting file co
ii libc6 2.3.2.ds1-22sarge6 GNU C Library: Shared libraries an
ii libdb4.3 4.3.27-2 Berkeley v4.3 Database Libraries [
ii libgpg-error0 1.0-1 library for common error values an
ii libgpgme11 1.0.2-1 GPGME - GnuPG Made Easy
ii zlib1g 1:1.2.2-4.sarge.2 compression library - runtime
-- no debconf information
pgpJpKlN5eqIw.pgp
Description: PGP signature

