Assertion failed (mempool.cc)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Assertion failed (mempool.cc)

Gabor Berczi
Greets.

I've fucked up something and now newly compiled squid executables  
don't start. The previous one does. Where do I start looking?

Assertion failed: (aLabel != NULL && aSize), function  
MemImplementingAllocator, file MemPool.cc, line 394.

Program received signal SIGABRT, Aborted.
[Switching to Thread 8024041c0 (LWP 100089/initial thread)]
0x00000008020d022c in kill () from /lib/libc.so.7
(gdb) bt
#0  0x00000008020d022c in kill () from /lib/libc.so.7
#1  0x00000008020cf02b in abort () from /lib/libc.so.7
#2  0x00000008020b8355 in __assert () from /lib/libc.so.7
#3  0x00000000008188e8 in MemImplementingAllocator (this=0x80240e7c0,
     aLabel=0x845614 "Short Strings", aSize=0) at MemPool.cc:394
#4  0x000000000081a220 in MemPoolMalloc (this=0x80240e7c0,
     aLabel=<value optimized out>, aSize=<value optimized out>)
     at MemPoolMalloc.cc:96
#5  0x0000000000817d3f in MemPools::create (this=<value optimized out>,
     label=0x845614 "Short Strings", obj_size=0) at MemPool.cc:111
#6  0x00000000005d2089 in Mem::Init () at mem.cc:454
#7  0x00000000005cefce in SquidMain (argc=1, argv=0x7fffffffe7c8) at  
main.cc:1391
#8  0x00000000005cfcc3 in main (argc=<value optimized out>,
     argv=<value optimized out>) at main.cc:1265

Or with -v:

(gdb) r -v
Starting program: /tmp/squid-3.5.28/src/squid -v
[New LWP 100093]
[New Thread 8024041c0 (LWP 100093/initial thread)]
Squid Cache: Version 3.5.28

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 8024041c0 (LWP 100093/initial thread)]
0x00000000005fe2ee in SBuf::rawContent (this=0xbf7220) at SBuf.cc:545
545         ++stats.rawAccess;
(gdb) bt
#0  0x00000000005fe2ee in SBuf::rawContent (this=0xbf7220) at SBuf.cc:
545
#1  0x00000000005cdd9e in mainParseOptions (argc=2, argv=0x7fffffffe7b8)
     at main.cc:563
#2  0x00000000005cef9f in SquidMain (argc=2, argv=0x7fffffffe7b8) at  
main.cc:1356
#3  0x00000000005cfcc3 in main (argc=<value optimized out>,
     argv=<value optimized out>) at main.cc:1265


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Assertion failed (mempool.cc)

Amos Jeffries
Administrator
On 19/07/20 3:43 am, Gabor Berczi wrote:
> Greets.
>
> I've fucked up something and now newly compiled squid executables don't
> start. The previous one does. Where do I start looking?
>

Are you building in a clean build directory from a clean set of sources?

What OS are you building on?

Are you building Squid from source code fetched directly from
squid-cache.org, or from a vendor (eg your OS packages)?

What (if any) patches have been applied to the code before building?


Also, is there a particular reason you are building 3.5?
 When building software yourself it is usually best to use the latest
version available. For Squid today that is version 4.12


HTH
Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Assertion failed (mempool.cc)

Gabor Berczi

On Jul 18, 2020, at 7:59 PM, Amos Jeffries wrote:

> Are you building in a clean build directory from a clean set of  
> sources?

Yes.

> What OS are you building on?

FreeBSD 8.4 amd64 but all of it is irrelevant. I know this is PEBKAC,  
but what I'm interested in is where/why. Already tried different gcc/
binutils/ssl.

>
> Are you building Squid from source code fetched directly from
> squid-cache.org

Yes.

> What (if any) patches have been applied to the code before building?

No.

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Assertion failed (mempool.cc)

Alex Rousskov
In reply to this post by Gabor Berczi
On 7/18/20 11:43 AM, Gabor Berczi wrote:

> newly compiled squid executables don't
> start. The previous one does. Where do I start looking?

I would try building the previous one again, using the exact same
procedure as you are using to build the new executable. Does the freshly
rebuilt old executable start OK? If yes, rebuild the new one from a
fresh directory. Just in case.

Also, checking (e.g., using "ldd") that both working and broken
executables are usining the same shared libraries may be useful.

Your gdb sessions suggest a broken/malformed executable. If that is what
happened, debugging it further is unlikely to be fruitful.


Good luck,

Alex.


> Assertion failed: (aLabel != NULL && aSize), function
> MemImplementingAllocator, file MemPool.cc, line 394.
>
> Program received signal SIGABRT, Aborted.
> [Switching to Thread 8024041c0 (LWP 100089/initial thread)]
> 0x00000008020d022c in kill () from /lib/libc.so.7
> (gdb) bt
> #0  0x00000008020d022c in kill () from /lib/libc.so.7
> #1  0x00000008020cf02b in abort () from /lib/libc.so.7
> #2  0x00000008020b8355 in __assert () from /lib/libc.so.7
> #3  0x00000000008188e8 in MemImplementingAllocator (this=0x80240e7c0,
>     aLabel=0x845614 "Short Strings", aSize=0) at MemPool.cc:394
> #4  0x000000000081a220 in MemPoolMalloc (this=0x80240e7c0,
>     aLabel=<value optimized out>, aSize=<value optimized out>)
>     at MemPoolMalloc.cc:96
> #5  0x0000000000817d3f in MemPools::create (this=<value optimized out>,
>     label=0x845614 "Short Strings", obj_size=0) at MemPool.cc:111
> #6  0x00000000005d2089 in Mem::Init () at mem.cc:454
> #7  0x00000000005cefce in SquidMain (argc=1, argv=0x7fffffffe7c8) at
> main.cc:1391
> #8  0x00000000005cfcc3 in main (argc=<value optimized out>,
>     argv=<value optimized out>) at main.cc:1265
>
> Or with -v:
>
> (gdb) r -v
> Starting program: /tmp/squid-3.5.28/src/squid -v
> [New LWP 100093]
> [New Thread 8024041c0 (LWP 100093/initial thread)]
> Squid Cache: Version 3.5.28
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 8024041c0 (LWP 100093/initial thread)]
> 0x00000000005fe2ee in SBuf::rawContent (this=0xbf7220) at SBuf.cc:545
> 545         ++stats.rawAccess;
> (gdb) bt
> #0  0x00000000005fe2ee in SBuf::rawContent (this=0xbf7220) at SBuf.cc:545
> #1  0x00000000005cdd9e in mainParseOptions (argc=2, argv=0x7fffffffe7b8)
>     at main.cc:563
> #2  0x00000000005cef9f in SquidMain (argc=2, argv=0x7fffffffe7b8) at
> main.cc:1356
> #3  0x00000000005cfcc3 in main (argc=<value optimized out>,
>     argv=<value optimized out>) at main.cc:1265

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Assertion failed (mempool.cc)

Gabor Berczi

On Jul 18, 2020, at 11:15 PM, Alex Rousskov wrote:

> I would try building the previous one again, using the exact same
> procedure as you are using to build the new executable. Does the freshly
> rebuilt old executable start OK? If yes, rebuild the new one from a
> fresh directory. Just in case.

I'm using the same shell script (e.g. options). But a plain ./configure && make
procedure is similarly unable to produce a working exe.

> Also, checking (e.g., using "ldd") that both working and broken
> executables are usining the same shared libraries may be useful.

They do.

Ah found the culprit. Turns out I was using "as" from binutils-2.27 (only checked "ld" before), mixed up with everything else.

--
G

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users