vipsoft / hhvm-ext-geoip

GeoIP extension for HipHop VM (HHVM HNI DSO)
Other
10 stars 8 forks source link

Segmentation fault libGeoIP - 1.6.1 #10

Closed oprudkyi closed 10 years ago

oprudkyi commented 10 years ago

hhvm and hhvm-ext-geo-ip from repositories libGeoIP - 1.6.1

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x2aaac55ff940 (LWP 5828)] 0x00002aaab8c48689 in _GeoIP_setup_dbfilename () at GeoIP.c:815 815 GeoIPDBFileName[GEOIP_USERTYPE_EDITION] = _GeoIP_full_path_to( (gdb) bt

0 0x00002aaab8c48689 in _GeoIP_setup_dbfilename () at GeoIP.c:815

1 0x00002aaab8c488b1 in GeoIP_db_avail (type=1) at GeoIP.c:900

2 0x00002aaab8a2f8c4 in HPHP::geoipExtension::updateCustomDirectory (value=...) at /root/hhvm/hhvm-ext-geoip/ext_geoip.cpp:840

3 0x000000000102f70e in std::_Function_handler<bool (std::string const&), bool (*)(std::string const&)>::_M_invoke(std::_Any_data const&, std::string const&) (functor=..., args#0=...)

at /root/hhvm/build/gcc49/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../include/c++/4.9.0/functional:2025

info sharedlibrary x00002aaab88142f0 0x00002aaab8820fc8 Yes /opt/hhvm/lib/hphp/extensions/20140702/geoip.so 0x00002aaab8a31cc0 0x00002aaab8a46b68 Yes /opt/hhvm/lib/libGeoIP.so.1

ls -la /opt/hhvm/lib/libGeoIP* lrwxrwxrwx 1 root root 17 Jul 7 21:58 /opt/hhvm/lib/libGeoIP.so.1 -> libGeoIP.so.1.6.1 -rwxr-xr-x 1 root root 929820 Jul 7 21:58 /opt/hhvm/lib/libGeoIP.so.1.6.1

segfault happens after some time I can repeat it locally with ab -c 20 -n 1000 ...url for checking geo ip

php code some like

        if (function_exists('geoip_db_avail') && geoip_db_avail(GEOIP_CITY_EDITION_REV1)) {
              $geoIpInfo = @geoip_record_by_name($ip);
            $result = 'Result : ' . print_r($geoIpInfo, true);
        } 

though, I will check with prev version of libGeoIP

robocoder commented 10 years ago

Thanks for the report. I haven't tested with hhvm master in a while.

robocoder commented 10 years ago

Please try db339c8. Thanks.

oprudkyi commented 10 years ago

Thank you 1.6.0. and 1.6.1 have passed test with ab I'm going to check with production

oprudkyi commented 10 years ago

Seems error is gone Thank you very much