Adapter loading error: file not found

Asked by Davor Micunovic

I try to build a custom eCAP squid adapter based on tutorials and examples.

Every time I try to load my custom built library (.so) file, I get error on squid init:

2017/07/21 17:42:40| Loading Squid module from '/usr/libexec/squid/sentinel-ecap.so'
2017/07/21 17:42:40| FATAL: dying from an unhandled exception: file not found
terminate called after throwing an instance of 'TextException'
  what(): file not found
Aborted (core dumped)

I'm using Arch Linux. I tried to download squid and rebuild it based on instructions provided on http://wiki.squid-cache.org/ConfigExamples/ContentAdaptation/eCAP, but nothing helps...

Squid version is 3.5.26-20170702-r14182 and libecap version is 1.0.1

Question information

Language:
English Edit question
Status:
Solved
For:
eCAP Edit question
Assignee:
No assignee Edit question
Solved by:
Davor Micunovic
Solved:
Last query:
Last reply:
Revision history for this message
Alex Rousskov (rousskov) said :
#1

Most likely, the dynamic linker cannot find some library or object. You need to figure what that missing piece is and add it. Running under "strace" or similar may help. Here are a few similar questions for inspiration:

* https://answers.launchpad.net/ecap/+question/273542
* https://answers.launchpad.net/ecap/+question/289447

Please make sure to post an update once you know what the solution was in your case.

Revision history for this message
Davor Micunovic (dmicunov) said :
#2

Hi Alex,

thank you very much for help. I executed command 'sudo strace -e trace=open squid -N -d 9' and I'm not able to figure out which library or object is missing. Here is the output:

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libnettle.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libssl.so.1.0.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libcrypto.so.1.0.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libgssapi_krb5.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libkrb5.so.3", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libcom_err.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libcap.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libltdl.so.7", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libk5crypto.so.3", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libkrb5support.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libkeyutils.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/etc/squid/squid.conf", O_RDONLY) = 3
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
open("/etc/host.conf", O_RDONLY|O_CLOEXEC) = 3
open("/etc/resolv.conf", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libnss_mymachines.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/run/systemd/machines/davorm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libnss_resolve.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/sys/fs/kdbus/0-system/bus", O_RDWR|O_NOCTTY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libnss_myhostname.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/etc/gai.conf", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libnsl.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 3
open("/etc/ssl/cert.pem", O_RDONLY) = 3
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 3
open("/etc/group", O_RDONLY|O_CLOEXEC) = 3
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libnss_systemd.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/var/log/squid/cache.log", O_RDWR|O_CREAT|O_APPEND, 0666) = 3
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 4
open("/run/squid.pid", O_RDONLY) = 4
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 4
open("/etc/group", O_RDONLY|O_CLOEXEC) = 4
open("/dev/shm/squid-cf__metadata.shm", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0600) = -1 EEXIST (File exists)
open("/dev/shm/squid-cf__metadata.shm", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0600) = 4
open("/dev/shm/squid-cf__queues.shm", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0600) = -1 EEXIST (File exists)
open("/dev/shm/squid-cf__queues.shm", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0600) = 5
open("/dev/shm/squid-cf__readers.shm", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0600) = -1 EEXIST (File exists)
open("/dev/shm/squid-cf__readers.shm", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0600) = 6
2017/07/24 09:28:39| Set Current Directory to /var/cache/squid
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 8
open("/etc/group", O_RDONLY|O_CLOEXEC) = 8
open("/var/log/squid/cache.log", O_RDWR|O_CREAT|O_APPEND, 0666) = 3
2017/07/24 09:28:39| Starting Squid Cache version 3.5.26 for x86_64-pc-linux-gnu...
2017/07/24 09:28:39| Service Name: squid
2017/07/24 09:28:39| Process ID 5215
2017/07/24 09:28:39| Process Roles: master worker
2017/07/24 09:28:39| With 1024 file descriptors available
2017/07/24 09:28:39| Initializing IP Cache...
open("/etc/hosts", O_RDONLY) = 8
2017/07/24 09:28:39| DNS Socket created at [::], FD 8
2017/07/24 09:28:39| DNS Socket created at 0.0.0.0, FD 9
open("/etc/resolv.conf", O_RDONLY) = 10
2017/07/24 09:28:39| Adding nameserver 213.147.96.51 from /etc/resolv.conf
2017/07/24 09:28:39| Adding nameserver 213.147.96.52 from /etc/resolv.conf
open("/usr/share/squid/errors/templates/ERR_ACCESS_DENIED", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_CACHE_ACCESS_DENIED", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_CACHE_MGR_ACCESS_DENIED", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_FORWARDING_DENIED", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_NO_RELAY", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_CANNOT_FORWARD", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_READ_TIMEOUT", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_LIFETIME_EXP", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_READ_ERROR", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_WRITE_ERROR", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_CONNECT_FAIL", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_SECURE_CONNECT_FAIL", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_SOCKET_FAILURE", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_DNS_FAIL", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_URN_RESOLVE", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_ONLY_IF_CACHED_MISS", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_TOO_BIG", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_INVALID_RESP", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_UNSUP_HTTPVERSION", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_INVALID_REQ", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_UNSUP_REQ", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_INVALID_URL", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_ZERO_SIZE_OBJECT", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_PRECONDITION_FAILED", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_CONFLICT_HOST", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_FTP_DISABLED", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_FTP_UNAVAILABLE", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_FTP_FAILURE", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_FTP_PUT_ERROR", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_FTP_NOT_FOUND", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_FTP_FORBIDDEN", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_FTP_PUT_CREATED", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_FTP_PUT_MODIFIED", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_ESI", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_ICAP_FAILURE", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_GATEWAY_FAILURE", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_DIR_LISTING", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/ERR_SHUTTING_DOWN", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/MGR_INDEX", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/squid/errorpage.css", O_RDONLY) = 10
open("/usr/share/squid/errors/templates/error-details.txt", O_RDONLY) = 10
2017/07/24 09:28:39| Logfile: opening log daemon:/var/log/squid/access.log
2017/07/24 09:28:39| Logfile Daemon: opening log /var/log/squid/access.log
2017/07/24 09:28:40| Unlinkd pipe opened on FD 15
2017/07/24 09:28:40| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2017/07/24 09:28:40| Store logging disabled
2017/07/24 09:28:40| Swap maxSize 102400 + 262144 KB, estimated 28041 objects
2017/07/24 09:28:40| Target number of buckets: 1402
2017/07/24 09:28:40| Using 8192 Store buckets
2017/07/24 09:28:40| Max Mem size: 262144 KB
2017/07/24 09:28:40| Max Swap size: 102400 KB
open("/var/cache/squid/swap.state", O_WRONLY|O_CREAT|O_APPEND, 0644) = 16
open("/var/cache/squid/swap.state.new", O_WRONLY|O_CREAT|O_TRUNC|O_APPEND, 0644) = 16
open("/var/cache/squid/swap.state", O_RDONLY) = 17
2017/07/24 09:28:40| Rebuilding storage in /var/cache/squid (no log)
2017/07/24 09:28:40| Using Least Load store dir selection
2017/07/24 09:28:40| Set Current Directory to /var/cache/squid
open("/etc/squid/mime.conf", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/image.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white_text.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/arrow_up.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/folder.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/link.png", O_RDONLY) = 17
open("/usr/share/squid/icons/SN.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/folder_table.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/music.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/film.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/computer_link.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/application.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/bullet_red.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/package_go.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white_acrobat.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_green.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white_picture.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/compress.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/script.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/database.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/cd.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white_magnify.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/box.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white_stack.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/package.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/photo.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_world.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/css.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white_c.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white_cplusplus.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_code.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white_zip.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white_word.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_excel.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white_powerpoint.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/picture.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/information.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/bomb.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/plugin_add.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/script_gear.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/cup.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/script_palette.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/film_key.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/plugin.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/drive_disk.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/chart_line.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/bricks.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/layers.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/page_white_flash.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/database_table.png", O_RDONLY) = 17
open("/usr/share/squid/icons/silk/layout.png", O_RDONLY) = 17
2017/07/24 09:28:40| Finished loading MIME types and icons.
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 18
open("/etc/group", O_RDONLY|O_CLOEXEC) = 18
2017/07/24 09:28:40| HTCP Disabled.
open("/etc/services", O_RDONLY|O_CLOEXEC) = 18
open("/run/squid.pid", O_WRONLY|O_CREAT|O_TRUNC|O_APPEND, 0644) = 18
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 19
open("/etc/group", O_RDONLY|O_CLOEXEC) = 19
2017/07/24 09:28:40| Loading Squid module from '/usr/local/libexec/squid/sentinel-ecap.so'
open("/usr/local/libexec/squid/sentinel-ecap.so", O_RDONLY|O_CLOEXEC) = 18
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 18
open("/usr/lib/libecap.so.3", O_RDONLY|O_CLOEXEC) = 18
open("/usr/lib/libmagic.so.1", O_RDONLY|O_CLOEXEC) = 18
open("/usr/lib/libz.so.1", O_RDONLY|O_CLOEXEC) = 18
2017/07/24 09:28:40| FATAL: dying from an unhandled exception: file not found
terminate called after throwing an instance of 'TextException'
  what(): file not found
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=5215, si_uid=15} ---
+++ killed by SIGABRT (core dumped) +++

Revision history for this message
Alex Rousskov (rousskov) said :
#3

I do not think this is a missing library. The error code (file not found) is probably unrelated to the actual error you are getting. Find out which code is throwing the error and go from there. You can do that by starting Squid from gdb after telling gdb to stop on exceptions ("catch throw" IIRC).

Revision history for this message
Davor Micunovic (dmicunov) said :
#4

Hi Alex,

thank you for helping.

I rebuilt squid without optimizations. Squid is run inside gdb as follows:

[davor@davorm etc]$ sudo gdb --args /usr/local/squid/sbin/squid -N
GNU gdb (GDB) 8.0
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/squid/sbin/squid...done.
(gdb) catch throw
Catchpoint 1 (throw)
(gdb) run
Starting program: /usr/local/squid/sbin/squid -N
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
2017/07/25 10:58:30| WARNING: BCP 177 violation. IPv6 transport forced OFF by build parameters.

Catchpoint 1 (exception thrown), __cxxabiv1::__cxa_throw (obj=0x55555603fb30, tinfo=0x555555eda468 <typeinfo for TextException>, dest=
    0x555555a250ce <TextException::~TextException()>) at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:75
75 /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc: No such file or directory.
(gdb) bt
#0 __cxxabiv1::__cxa_throw (obj=0x55555603fb30, tinfo=0x555555eda468 <typeinfo for TextException>,
    dest=0x555555a250ce <TextException::~TextException()>) at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:75
#1 0x0000555555a21803 in File::open (this=0x555556033720, cfg=...) at File.cc:193
#2 0x0000555555a21493 in File::File (this=0x555556033720, aName=..., cfg=...) at File.cc:143
#3 0x0000555555a211c3 in File::Optional (filename=..., cfg=...) at File.cc:129
#4 0x00005555558ea1bf in Instance::ThrowIfAlreadyRunning () at Instance.cc:144
#5 0x00005555558f5afe in SquidMain (argc=2, argv=0x7fffffffebc8) at main.cc:1587
#6 0x00005555558f54b6 in SquidMainSafe (argc=2, argv=0x7fffffffebc8) at main.cc:1415
#7 0x00005555558f5487 in main (argc=2, argv=0x7fffffffebc8) at main.cc:1403
(gdb) frame 2
#2 0x0000555555a21493 in File::File (this=0x555556033720, aName=..., cfg=...) at File.cc:143
143 open(cfg);
(gdb) print aName.c_str()
$1 = 0x55555603fc90 "/usr/local/squid/var/run/squid.pid"

It seems that the problem is in missing squid.pid file.

Revision history for this message
Davor Micunovic (dmicunov) said :
#5

Please ignore comment #4, I did more debugging and here are findings:

2017/07/25 14:30:07| Loading Squid module from '/usr/local/squid/libexec/sentinel-ecap.so'

Catchpoint 1 (exception thrown), __cxxabiv1::__cxa_throw (obj=0x555556485450, tinfo=0x555555eda468 <typeinfo for TextException>,
    dest=0x555555a250ce <TextException::~TextException()>) at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:75
75 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) bt
#0 __cxxabiv1::__cxa_throw (obj=0x555556485450, tinfo=0x555555eda468 <typeinfo for TextException>,
    dest=0x555555a250ce <TextException::~TextException()>) at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:75
#1 0x0000555555982dfe in LoadableModule::load (this=0x5555564840a0, mode=0) at LoadableModule.cc:47
#2 0x00005555559830d3 in LoadModule (fname=0x55555603b880 "/usr/local/squid/libexec/sentinel-ecap.so") at LoadableModules.cc:21
#3 0x000055555598325a in LoadableModulesConfigure (names=0x55555603b250) at LoadableModules.cc:32
#4 0x00005555558f511c in mainInitialize () at main.cc:1293
#5 0x00005555558f5e69 in SquidMain (argc=4, argv=0x7fffffffeba8) at main.cc:1664
#6 0x00005555558f54b6 in SquidMainSafe (argc=4, argv=0x7fffffffeba8) at main.cc:1415
#7 0x00005555558f5487 in main (argc=4, argv=0x7fffffffeba8) at main.cc:1403
(gdb) ni
0x00007ffff5cb0e92 75 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
0x00007ffff5cb0e93 75 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
0x00007ffff5cb0e96 75 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
75 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
0x00007ffff5cb0e9a 75 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
78 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
79 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
82 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
0x00007ffff5cb0ea9 82 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
0x00007ffff5cb0eac 82 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
0x00007ffff5cb0eaf 82 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
88 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
83 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
88 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
0x00007ffff5cb0ec1 88 in /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) ni
SquidMainSafe (argc=4, argv=0x7fffffffeba8) at main.cc:1416
1416 } catch (...) {
(gdb) ni
0x00005555558f54bb 1416 } catch (...) {
(gdb) ni
1417 debugs(1, DBG_CRITICAL, "FATAL: " << CurrentException);
(gdb) ni
0x00005555558f54c7 1417 debugs(1, DBG_CRITICAL, "FATAL: " << CurrentException);
(gdb) ni
0x00005555558f54cc 1417 debugs(1, DBG_CRITICAL, "FATAL: " << CurrentException);
(gdb)

Revision history for this message
Davor Micunovic (dmicunov) said :
#6

Hi Alex,

first, thank you very much for help. I managed to load my custom module. Problem was that I had one unimplemented method defined in header and in lt_error.c file, errormsg was set to 'undefined symbol'.
I managed to figure out this using gdb, putting breakpoint on lt_error.c:109 and running squid inside.

Thank you very much for help and sorry for wasting your time.

Best regards,
Davor

Revision history for this message
Alex Rousskov (rousskov) said :
#7

Glad you figured it out! If you think that Squid should report such errors better/differently, please file a bug report with the Squid Project.