Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E97D19DCD for ; Fri, 22 Jun 2012 16:23:03 +0000 (UTC) Received: (qmail 68605 invoked by uid 500); 22 Jun 2012 16:23:03 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 68503 invoked by uid 500); 22 Jun 2012 16:23:03 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 68487 invoked by uid 99); 22 Jun 2012 16:23:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 16:23:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jlewis@silverhawk.net designates 209.85.210.45 as permitted sender) Received: from [209.85.210.45] (HELO mail-pz0-f45.google.com) (209.85.210.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 16:22:55 +0000 Received: by dadn2 with SMTP id n2so3083355dad.18 for ; Fri, 22 Jun 2012 09:22:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=NVXwT8UqtAukZWDrAVjxJcmoVPjOGKNylS+jSC8aTqg=; b=nRcpV49zCz5vptOWoZ522CcQSw21z6rXzXtLvdTjiac98pcZEysBWW+ynBJ6kb9aPI hgAcZfZwO8Mnqt4UxigSWTGXjXwhhIT4vR9scgPGSaFztNOmZqOY9FbE2gyJ5U9wE/kD NL94Q8gHtR+iy2Uha241F7gsygJZBJalbe3VyqHig0ud78Dov8vpzPqBzK4NU59M+5Rj tb4QrPxMLtcZr9BN3+5ampZUHq/x48PwnRDCxuQO+ReM3UbM3v/wUoDrQlfdIyiV6SaG 3WB1qy6LXEGZF2Xhtd01RFpAtrlwQ3HhfwypGz7afbck9dqlvdgG7ySnJ3y5N6oZq5VB tsOw== Received: by 10.68.227.195 with SMTP id sc3mr11478126pbc.104.1340382153378; Fri, 22 Jun 2012 09:22:33 -0700 (PDT) Received: from [192.168.1.148] (cottonwoodheights.silverhawk.net. [63.226.93.31]) by mx.google.com with ESMTPS id u5sm39341480pbu.76.2012.06.22.09.22.31 (version=SSLv3 cipher=OTHER); Fri, 22 Jun 2012 09:22:32 -0700 (PDT) Sender: Joe Lewis Message-ID: <4FE49BC6.20504@joe-lewis.com> Date: Fri, 22 Jun 2012 10:22:30 -0600 From: Joe Lewis User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: Followup to earlier thread about "How to compiling/link/use Apache module that uses shared library?" References: <20120622113545.V1HJY.192615.imail@eastrmwml108> In-Reply-To: <20120622113545.V1HJY.192615.imail@eastrmwml108> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlNHED4QaKSkFHFti44LQ54lbjaz8G6PzP4bXb/WVMOQ9AKqJnOpHVkQdTxQCczEQjnG9UI On 6/22/12 9:35 AM, ohaya@cox.net wrote: > ---- ohaya@cox.net wrote: >> Hi, >> >> Now that I've gotten by earlier problems with the module I'm working on (see thread "Re: UNSOLVED was Re: SOLVED was Re: How to compiling/link/use Apache module that uses shared library?"), I am trying to get my module to work with the stuff in that libobaccess.so. This .so is part of Oracle's Access Server SDK (ASDK). >> >> The problem I'm running into now is that there's an initialization call in the library that I need to make, ObConfig_initialize() that is suppose to initialize the SDK environment, but when I call that (it takes either NULL or a const * char as parameter), it's blowing up (Apache aborts). >> >> I *think* that the problem is that the libobaccess.so is actually C++, with a bunch of wrapper-type C functions to wrap the C++ functions, i.e., so my module (which is C) calls a function, and inside obaccess.so the function calls a C++ function)., and it's probably blowing up because the Oracle code doesn't know anything about Pool memory, but rather uses C++ new, etc. >> >> Here's a gdb backtrace showing this: >> >> In callAccessGate()... >> >> >> In callAccessGate(): About to set handler... >> >> In callAccessGate(): returned from set handler >> >> >> In callAccessGate(): About to call ObConfig_initialize()... >> >> Program received signal SIGABRT, Aborted. >> [Switching to Thread 182897612000 (LWP 15573)] >> 0x000000351432e26d in raise () from /lib64/tls/libc.so.6 >> (gdb) bt full >> #0 0x000000351432e26d in raise () from /lib64/tls/libc.so.6 >> No symbol table info available. >> #1 0x000000351432fa6e in abort () from /lib64/tls/libc.so.6 >> No symbol table info available. >> #2 0x000000351a7b1148 in __gnu_cxx::__verbose_terminate_handler () from /lib64/libstdc++.so.6 >> No symbol table info available. >> #3 0x000000351a7af176 in __cxa_call_unexpected () from /lib64/libstdc++.so.6 >> No symbol table info available. >> #4 0x000000351a7af1a3 in std::terminate () from /lib64/libstdc++.so.6 >> No symbol table info available. >> #5 0x000000351a7af2a3 in __cxa_throw () from /lib64/libstdc++.so.6 >> No symbol table info available. >> #6 0x0000002a97898a05 in ObThreadInitNLS () from /apps/netpoint/lib64/libobaccess.so >> No symbol table info available. >> #7 0x0000002a97898f75 in SetGlobalInTLS () from /apps/netpoint/lib64/libobaccess.so >> No symbol table info available. >> #8 0x0000002a9789913f in GetGlobalFromTLS () from /apps/netpoint/lib64/libobaccess.so >> No symbol table info available. >> #9 0x0000002a97899edc in NLS::NLS () from /apps/netpoint/lib64/libobaccess.so >> No symbol table info available. >> #10 0x0000002a9773f1b1 in ObConfig::initialize () from /apps/netpoint/lib64/libobaccess.so >> No symbol table info available. >> #11 0x0000002a976ee55d in ObConfig_initialize () from /apps/netpoint/lib64/libobaccess.so >> ---Type to continue, or q to quit--- >> No symbol table info available. >> #12 0x0000002a97b94266 in callAccessGate ( >> PEM=0x706850 "MIICrTCCAhagAwIBAgICECUwDQYJKoZIhvcNAQEEBQAwgZMxCzAJBgNVBAYTAlVT\nMQswCQYDVQQIEwJWQTEPMA0GA1UEBxMGT0FLVE9OMRMwEQYDVQQKEwpKTFNpbXBs\nZUNBMRIwEAYDVQQLEwlKTERlbW8gQ0ExGzAZBgNVBAMTEkpMU2ltcGxlQ0EgRGVt\nbyBDQ"..., >> url=0x2a97b956b0 "//apache1/certprotected/index.html") at mod_headers.c:847 >> res = Variable "res" is not available. >> (gdb) >> >> So, my code calls ObConfig_initialize() then it appears that that calls ObConfig_initialize() which is presumably a C++ function. >> >> In general, is there any way to handle this problem/situation if it's memory allocation (inside libobaccess.so) related? >> >> Thanks, >> Jim > Sorry. I meant to say: > > "So, my code calls ObConfig_initialize() then it appears that that calls > ObConfig::initialize() which is presumably a C++ function. " > > Jim I believe you are correct - the previous stack traces (exception handling) is a C++ thing. The real problem you have is that it's using malloc() and free(), and I don't think you can manipulate that. You may have to contact Oracle to see if there are functions to override their use of malloc and free. If there's not a way to override, you have one option - on post_config, spin off a separate process that you communicate with via socket/IPC. Joe -- http://www.silverhawk.net/