1. Magnus Hallin
  2. py-scrypt
  3. Issues
Issue #2 new

Segmentation Fault

Bailey Stoner
created an issue

I think that this might be a potential issue that I've ran in to. I've tried it on a couple different machines using Ubuntu 10.10 in a Python virtual environment.

Please let me know if you need any more information regarding the issue.



Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import scrypt password = 'bananas' string = 'cheese' encrypted_string = scrypt.encrypt(string, password, 0.5) decrypted_string = scrypt.decrypt(encrypted_string, password, 0.5) Segmentation fault


Comments (6)

  1. Magnus Hallin repo owner

    I can't reproduce this behavior on my Ubuntu machine, can I get some more information about the machines? For example, are you on 32 or 64 bit?

    Also, could you possibly run python in GDB and giving me the backtrace you get after the segfault?

  2. Anonymous

    I am on a 64-bit Ubuntu machine with GCC version 4.4.5. I have tried manually compiling scrypt, and using the CLI 'scrypt' tool on a file. It encrypted and decrypted the file properly.

    After this test, I created

    The following output might be of help to you regarding my system's configuration:

    ~/test-env/test: gcc -v
    Using built-in specs.
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
    Thread model: posix
    gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) 
    ~/test-env/test: uname -a
    Linux ubuntu 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:44 UTC 2011 x86_64 GNU/Linux

    If you have VMWare, VirtualBox, or something akin to this installed - you can actually duplicate my exact config by creating a new virtual machine with a Ubuntu 10.10 disk image, installing git-core, and then checking out the following repository: https://github.com/monokrome/configuration/

    The following command should install all packages currently on my system after a clone of the repository:

        cd configuration/tools && ./ubuntu_install.sh desktop

    I'm not sure which of this information is useful or not, but I hope there is enough for you to possibly reproduce the issue. Let me know if you need any more help identifying the problem.

  3. Anonymous

    Sorry for the missing sentence in the last post. The second paragraph should have continued as so:

    After this test, I created a new virtualenv and attempted to execute the code that I originally had the issue with. The same issue occurred. The only command ran after creating the virtualenv (and the only command before running the script) was:

    pip install hg+https://bitbucket.org/mhallin/py-scrypt

    I did not use --no-site-packages, so it should have used the version of scrypt that I built earlier.

  4. Magnus Hallin repo owner

    Alright, so now I've done the following:

    • Installed Ubuntu 10.10 64bit in a VirtualBox (with the same GCC and kernel version as you wrote above),
    • Installed the packages from the ubuntu_install.sh command,
    • Created a virtualenv with py-scrypt within.

    And I still can't get it to segfault.

    Could you possibly get a core-file from the crashed Python by running ulimit -c unlimited before running the script that segfaults?

  5. Anonymous

    Sure, I can do that. Before I do, will this make a permanent change to my system - and will the core dump be in my current working directory?

  6. Magnus Hallin repo owner

    The ulimit command will only affect the shell it's executed in, nothing more. The core file will normally be placed in the current working directory.

    (Assigning to me so I'll get notifications on mail)

  7. Log in to comment