equalitie / np1sec-test-client

A full-featured proof of concept implementation of an np1sec chat client, implemented as a pidgin plugin.
20 stars 7 forks source link

Ohhhh jeeee: mpi_swap_cond: different sizes #2

Open fauno opened 7 years ago

fauno commented 7 years ago

when toggling on np1sec on a chatroom window, pidgin dies immediately with this message :)

inetic commented 7 years ago

Thanks @fauno, what OS are you running?

fauno commented 7 years ago

Parabola GNU/Linux-libre, pidgin version is 2.11.0

:D

inetic commented 7 years ago

I gave it a shot on parabola, but couldn't reproduce the crash. If you're willing, could you try with the latest np1sec-test-client and np1sec library? @redlizard has put together a convenience script so it shouldn't take a lot of your time. If you do give it a shot, the last two lines the script outputs are the commit hashes of the two libraries, please paste them here if you still see the crash.

fauno commented 7 years ago

oh, i was using stock pidgin, i'll try with your script

-- D

inetic commented 7 years ago

The plugin should work with stock pidgin as well, perhaps you're using some other plugins that interfere with this one.

redlizard commented 7 years ago

What version of libgcrypt do you use?

fauno commented 7 years ago

libgcrypt 1.7.3

-- :D

inetic commented 7 years ago

I'm going to close this. The plugin has changed signifficantly on the past few weeks with many memory leaks fixed. If someone still sees issues, please open a new issue (or reopen this one).

fauno commented 7 years ago

same error using stock pidgin and building library and plugin from master. this time it happens immediately when opening a chat window :)

run-np1sec.sh fails to validate pidgin's tarball checksum

inetic commented 7 years ago

Thanks, I'll reopen the issue then.

Have you used the run-np1sec.sh script to run it? One of the the things it does is it checks whether you have memory sanitizer installed on your system (it comes with gcc on Ubuntu I believe) and if you do, it compiles everything with it. Then on crash, it usually prints out some useful debug trace.

Have you seen something like that? If so, could you send us the output?

fauno commented 7 years ago

i tried to use it but the pidgin url fails checksum because it downloads an html page. i'll modify some things and come back

-- :O

fauno commented 7 years ago

ok, it doesn't happen with the test pidgin, i'll try building the stock one with debug flags

-- .oÓ)

fauno commented 7 years ago

ok, i rebuilt stock pidgin with asan enabled and i got the same error with no asan messages :P

i could enable the plugin after disabling all accounts and then joining a channel (irc or jabber) i get the ohhh jeee error. maybe i can produce a core dump for you? (does it contain any metadata? i never examined them)

i was going to attach the asan log from when i could enable the plugin but it doesn't mention anything from np1sec

-- D

inetic commented 7 years ago

Thanks for all this info.

i tried to use it but the pidgin url fails checksum because it downloads an html page.

This is really odd, the command to get the tar file is

wget http://sourceforge.net/projects/pidgin/files/Pidgin/2.11.0/pidgin-2.11.0.tar.bz2

It's really puzzling why that would download a html file.

ok, i rebuilt stock pidgin with asan enabled and i got the same error with no asan messages :P

I believe everything needs to be built with asan for it to work: pidgin, np1sec and np1sec-test-client

i could enable the plugin after disabling all accounts and then joining a channel (irc or jabber) i get the ohhh jeee error.

Just for me to have a more complete picture, are you using any other plugins? It may be that other plugins do modifications to the GUI and then when this client tries to do the same it fails to find some widgets at places it expect them to be. A good test for this theory would be to disable all the plugins prior to enabling this one.

the ohhh jeee error

Does the output actually say "ohhh jeee"? :)

maybe i can produce a core dump for you? (does it contain any metadata? i never examined them)

I think I would need the executable and other libraries from your system to properly examite the core file. You could however run gdb with the coredump and send us the backtrace:

$ gdb <executable> <corefile>
(gdb) backtrace

Another usefult thing would be to do

$ export NP1SEC_TEST_CLIENT_PRINT_LOG=true

Prior to executing pidgin (the script does this). This enables a lot of debug output from np1sec-test-client.

Thanks again

fauno commented 7 years ago

Peter Jankuliak notifications@github.com writes:

It's really puzzling why that would download a html file.

i solved it by downloading the tarball myself

I believe everything needs to be built with asan for it to work: pidgin, np1sec and np1sec-test-client

yes, i was using the np1sec lib and plugin built by run-test.sh

Just for me to have a more complete picture, are you using any other plugins? It may be that other plugins do modifications to the GUI and then when this client tries to do the same it fails to find some widgets at places it expect them to be. A good test for this theory would be to disable all the plugins prior to enabling this one.

i'll try this, the other plugin i'm using that modifies the gui is otr, but it shouldn't affect the channel

Does the output actually say "ohhh jeee"? :)

it does!

I think I would need the executable and other libraries from your system to properly examite the core file. You could however run gdb with the coredump and send us the backtrace:

$ gdb <executable> <corefile>
(gdb) backtrace

ok i'll do this

Another usefult thing would be to do

$ export NP1SEC_TEST_CLIENT_PRINT_LOG=true

i did, but it didn't have any effect

-- http://utopia.partidopirata.com.ar/

fauno commented 7 years ago

it's the same with no plugins enabled

-- http://partidopirata.com.ar

fauno commented 7 years ago

apparently i don't have enough resources to generate a coredump :P

i'll ask some friends if they find the same as i do

-- :>

inetic commented 7 years ago

apparently i don't have enough resources to generate a coredump :P

I think what you've hit is not that your hardware isn't good enough, but that the system limits the size of the core that can be generated. On many systems the default is 0. To check that you can try running

$ ulimit -c

If it's zero, you can try doing

$ ulimit -c unlimited

But since you can recreate the bug each time, the easier way to get trace would be to run pidgin directly from gdb:

$ gdb -ex=r --args ./bin/bin/pidgin --config=pidgin-home

And then - once you get the crash - execute the backtrace command in gdb:

(gdb) backtrace