Re: [SQU] Squid 2.4 Head FATAL: Received Segment Violation...dying

From: Alejandro A. Ramirez <ales@dont-contact.us>
Date: Mon, 19 Feb 2001 18:06:55 -0600

Ok, the patch applied cleanly, and now it did finished rebuilding the cache,
now let me try to make it crash loading the system, I will inform you the
results with ufs storage.

Thanks
Ales

----- Original Message -----
From: "Henrik Nordstrom" <hno@hem.passagen.se>
To: "Alejandro A. Ramirez" <ales@megared.net.mx>
Cc: <squid-dev@squid-cache.org>
Sent: Monday, February 19, 2001 5:09 PM
Subject: Re: [SQU] Squid 2.4 Head FATAL: Received Segment Violation...dying

> Alejandro A. Ramirez wrote:
>
> > 2001/02/19 16:13:26| WARNING: newer swaplog entry for dirno 4, fileno
> > 0000F747
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x80b2416 in storeUfsDirReplRemove (e=0xceea980) at store_dir_ufs.c:1426
> > 1426 SD->repl->Remove(SD->repl, e, &e->repl);
> > (gdb) bt
> > #0 0x80b2416 in storeUfsDirReplRemove (e=0xceea980) at
store_dir_ufs.c:1426
> > #1 0x80afe2d in storeUfsDirRebuildFromSwapLog (data=0x9b9b000) at
> > store_dir_ufs.c:567
> > #2 0x806b456 in eventRun () at event.c:147
> > #3 0x80882ca in main (argc=2, argv=0xbfbffc24) at main.c:716
> > #4 0x804a529 in _start ()
> >
> > (gdb) print *e
> > $1 = {hash = {key = 0xcee8be0, next = 0xca6b4c0}, mem_obj = 0xc1b2f80,
repl
> > = {
> > data = 0x0}, timestamp = 982620505, lastref = 982620811, expires =
> > 982620811,
> > lastmod = 972413573, swap_file_sz = 0, swap_filen = -1, swap_dirn
= -1,
> > refcount = 1, flags = 1224, lock_count = 1, mem_status = 0,
ping_status =
> > 2,
> > store_status = 0, swap_status = 0}
>
> Hmm... "swap_dirn = -1"... oops. the code forgot to handle concurrent
> requests while rebuilding the cache.
>
> Please try the attached patch.
>
> /Henrik
>

----------------------------------------------------------------------------

----
> ? q
> Index: aufs/store_dir_aufs.c
> ===================================================================
> RCS file: /server/cvs-server/squid/squid/src/fs/aufs/store_dir_aufs.c,v
> retrieving revision 1.30
> diff -u -w -r1.30 store_dir_aufs.c
> --- aufs/store_dir_aufs.c 2001/02/10 16:40:41 1.30
> +++ aufs/store_dir_aufs.c 2001/02/19 23:06:03
> @@ -569,8 +569,8 @@
>   */
>   storeExpireNow(e);
>   storeReleaseRequest(e);
> - storeAufsDirReplRemove(e);
>   if (e->swap_filen > -1) {
> +     storeAufsDirReplRemove(e);
>       storeAufsDirMapBitReset(SD, e->swap_filen);
>       e->swap_filen = -1;
>       e->swap_dirn = -1;
> @@ -657,8 +657,8 @@
>       /* junk old, load new */
>       storeExpireNow(e);
>       storeReleaseRequest(e);
> -     storeAufsDirReplRemove(e);
>       if (e->swap_filen > -1) {
> + storeAufsDirReplRemove(e);
>   /* Make sure we don't actually unlink the file */
>   storeAufsDirMapBitReset(SD, e->swap_filen);
>   e->swap_filen = -1;
> Index: diskd/store_dir_diskd.c
> ===================================================================
> RCS file: /server/cvs-server/squid/squid/src/fs/diskd/store_dir_diskd.c,v
> retrieving revision 1.40
> diff -u -w -r1.40 store_dir_diskd.c
> --- diskd/store_dir_diskd.c 2001/02/10 16:40:42 1.40
> +++ diskd/store_dir_diskd.c 2001/02/19 23:06:08
> @@ -761,8 +761,8 @@
>   */
>   storeExpireNow(e);
>   storeReleaseRequest(e);
> - storeDiskdDirReplRemove(e);
>   if (e->swap_filen > -1) {
> +     storeDiskdDirReplRemove(e);
>       storeDiskdDirMapBitReset(SD, e->swap_filen);
>       e->swap_filen = -1;
>       e->swap_dirn = -1;
> @@ -849,8 +849,8 @@
>       /* junk old, load new */
>       storeExpireNow(e);
>       storeReleaseRequest(e);
> -     storeDiskdDirReplRemove(e);
>       if (e->swap_filen > -1) {
> + storeDiskdDirReplRemove(e);
>   /* Make sure we don't actually unlink the file */
>   storeDiskdDirMapBitReset(SD, e->swap_filen);
>   e->swap_filen = -1;
> Index: ufs/store_dir_ufs.c
> ===================================================================
> RCS file: /server/cvs-server/squid/squid/src/fs/ufs/store_dir_ufs.c,v
> retrieving revision 1.29
> diff -u -w -r1.29 store_dir_ufs.c
> --- ufs/store_dir_ufs.c 2001/02/10 16:40:43 1.29
> +++ ufs/store_dir_ufs.c 2001/02/19 23:06:11
> @@ -566,8 +566,8 @@
>   */
>   storeExpireNow(e);
>   storeReleaseRequest(e);
> - storeUfsDirReplRemove(e);
>   if (e->swap_filen > -1) {
> +     storeUfsDirReplRemove(e);
>       storeUfsDirMapBitReset(SD, e->swap_filen);
>       e->swap_filen = -1;
>       e->swap_dirn = -1;
> @@ -654,8 +654,8 @@
>       /* junk old, load new */
>       storeExpireNow(e);
>       storeReleaseRequest(e);
> -     storeUfsDirReplRemove(e);
>       if (e->swap_filen > -1) {
> + storeUfsDirReplRemove(e);
>   /* Make sure we don't actually unlink the file */
>   storeUfsDirMapBitReset(SD, e->swap_filen);
>   e->swap_filen = -1;
>
Received on Mon Feb 19 2001 - 17:11:46 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:33 MST