Skip to content
This repository was archived by the owner on Feb 10, 2021. It is now read-only.
This repository was archived by the owner on Feb 10, 2021. It is now read-only.

Segfault When Initiating HDFS Connection #163

@lucashu1

Description

@lucashu1

Hi,

I'm getting a segfault when trying to create a connection using the HDFileSystem constructor. The code that I'm running is:

from hdfs3 import HDFileSystem
hdfs = HDFileSystem([HOSTNAME], port=[PORT-NUM])

(with HOSTNAME and PORT-NUM filled in, ofc.)

When I run the script through GDB (for debugging purposes), I get:

Starting program: /home/jovyan/.conda/bin/python hdfs-test.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106	../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) backtrace
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007ffff3ff83ee in std::char_traits<char>::length (__s=0x1 <error: Cannot access memory at address 0x1>)
   from /home/jovyan/.conda/lib/python3.6/lib-dynload/../../libhdfs3.so
#2  std::string::assign (__s=0x1 <error: Cannot access memory at address 0x1>, this=0x555555c27fa0)
    at /feedstock_root/build_artefacts/libhdfs3_1526441785297/work/libhdfs3/src/client/FileSystem.cpp:1131
#3  std::string::operator= (__s=0x1 <error: Cannot access memory at address 0x1>, this=0x555555c27fa0)
    at /feedstock_root/build_artefacts/libhdfs3_1526441785297/work/libhdfs3/src/client/FileSystem.cpp:555
#4  Hdfs::FileSystem::FileSystem (this=0x555555c27fa0, conf=..., euser=0x1 <error: Cannot access memory at address 0x1>)
    at /feedstock_root/build_artefacts/libhdfs3_1526441785297/work/libhdfs3/src/client/FileSystem.cpp:148
#5  0x00007ffff400f117 in hdfsBuilderConnect (bld=0x555555bf8c40, 
    effective_user=0x1 <error: Cannot access memory at address 0x1>)
   from /home/jovyan/.conda/lib/python3.6/lib-dynload/../../libhdfs3.so
#6  0x00007ffff6607ec0 in ffi_call_unix64 () from /home/jovyan/.conda/lib/python3.6/lib-dynload/../../libffi.so.6
#7  0x00007ffff660787d in ffi_call () from /home/jovyan/.conda/lib/python3.6/lib-dynload/../../libffi.so.6
#8  0x00007ffff681cdee in _ctypes_callproc ()
   from /home/jovyan/.conda/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
#9  0x00007ffff681d825 in PyCFuncPtr_call ()
   from /home/jovyan/.conda/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
#10 0x00005555556631bb in _PyObject_FastCallDict ()
#11 0x00005555556f0d3e in call_function ()
#12 0x000055555571519a in _PyEval_EvalFrameDefault ()
#13 0x00005555556ea7db in fast_function ()
#14 0x00005555556f0cc5 in call_function ()
#15 0x000055555571519a in _PyEval_EvalFrameDefault ()
#16 0x00005555556e99a6 in _PyEval_EvalCodeWithName ()
#17 0x00005555556eb108 in _PyFunction_FastCallDict ()
#18 0x000055555566339f in _PyObject_FastCallDict ()
#19 0x0000555555667ff3 in _PyObject_Call_Prepend ()
#20 0x0000555555662dde in PyObject_Call ()
#21 0x00005555556bdf6b in slot_tp_init ()
#22 0x00005555556f0f27 in type_call ()
#23 0x00005555556631bb in _PyObject_FastCallDict ()
#24 0x00005555556eacfa in _PyObject_FastCallKeywords ()
#25 0x00005555556f0d3e in call_function ()
#26 0x0000555555715eb1 in _PyEval_EvalFrameDefault ()
#27 0x00005555556eb529 in PyEval_EvalCodeEx ()
#28 0x00005555556ec2cc in PyEval_EvalCode ()
#29 0x0000555555768af4 in run_mod ()
#30 0x0000555555768ef1 in PyRun_FileExFlags ()
#31 0x00005555557690f4 in PyRun_SimpleFileExFlags ()
#32 0x000055555576cc28 in Py_Main ()
#33 0x000055555563471e in main ()

I installed hdfs3 via conda (conda install -c conda-forge hdfs3).

Here are the package versions installed by conda-forge:

    boost-cpp:    1.66.0-1         conda-forge
    bzip2:        1.0.6-1          conda-forge
    curl:         7.59.0-1         conda-forge
    hdfs3:        0.3.0-py36_0     conda-forge
    icu:          58.2-0           conda-forge
    krb5:         1.14.6-0         conda-forge
    libgcrypt:    1.8.2-hfc679d8_1 conda-forge
    libgpg-error: 1.31-hf484d3e_0  conda-forge
    libgsasl:     1.8.0-2          conda-forge
    libhdfs3:     2.3.0-2          conda-forge
    libiconv:     1.15-0           conda-forge
    libntlm:      1.4-1            conda-forge
    libprotobuf:  3.5.2-0          conda-forge
    libssh2:      1.8.0-2          conda-forge
    libuuid:      1.0.3-1          conda-forge
    libxml2:      2.9.8-0          conda-forge

I don't think there's anything wrong with the Hadoop setup, since I'm still able to access it using hadoop fs commands.

Any thoughts on what could be going wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions