New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ftptop segfaults when using libncursesw on Gentoo #1174
Comments
A run via
|
Hmm. Would you happen to know which particular Gentoo version? I'm hoping to find a Docker image for that Gentoo version, and package build/install instructions that you used, so that I can reproduce this segfault locally. |
Gentoo is a rolling distribution, all binaries are generated by the corresponding upstream sources whenever you like. Therefore, there is no "Gentoo version" existing. Thus, this is build from "your" release V1.3.7a. I may send you either the ftptop binary, the resulting install package or whatever you need, if you like. |
Fair enough. Assume I'm starting with a bare/base "stage3" Gento installation. What would be the series of commands I would need to run, to install all of the necessary tools, to then configure/build/install ProFTPD, to reproduce the |
On a "well-configured" stage3, an invoke of Said that, to ease things for you I may also provide you
The |
I'm hoping that the causes for this are not Gentoo-specific, thus why I'm trying to reproduce this locally on a different platform, if I can. The main change in
So that's what I'm focusing my attention on. For your setup, what does the following show?
I'm hoping to see which specific curses-related things were found by Another interesting comparison to see would be the |
I'm sorry, no differences:
I may provide you tarballs of the build sandboxes for both versions if you like (each about 20MB). Here you may compare the sources and act with the plain vanilla build commands, e.g. you may invoke |
The working, stopped immediate by
|
I'm also able to provide you a core dump, now! (34k compressed)
|
That backtrace helps quite a bit, actually. What's odd about it is that it shows the segfault occurring when we call What does |
Working 1.3.6b ...
Non-working 1.3.7a
If you tell me an destination, I may upload the things offered above. I may also insert any debug code you propose into the source if you like.. |
No, based on some other findings, I think this is a Gentoo-specific issue with
The bug is that, when linking against libncursesw-6, the Gentoo linker links against both I may be able to address this, but, to help that, what does the following show?
|
…sed. On some systems, such as Gentoo, linking against libtinfo with libncursesw, rather than libtinfow, leads to segfaults.
Since two minutes, I can confirm that's not direct from a code change related to utils/ftptop.c: I ported back the old, withdrawn ebuild for 1.3.6 to the current Eval stage and let this version run up to the step you know as |
Old:
New:
|
Do you think something like https://github.com/jonas/tig/pull/585/files will fix it? |
Oh! It's mentioned at https://bugs.gentoo.org/692954#c16 and before. I confirm that the PoC to run by |
Could you see if #1198 also fixes this? |
There a lot of diffs between the 1.3.7a and the files of #1198. But building run through. And Did that mean that you see the issue in your domain or have it to be fixed at Gentoo side? |
It's one of those issues where it occurs on Gentoo because of how their libraries are set up; not every platform will see these same issues. But the solution does need to be in ProFTPD's build system; it needs to detect, and use, libtinfow (instead of libtinfo) when available. Thanks for confirming the fix! |
…sed. On some systems, such as Gentoo, linking against libtinfo with libncursesw, rather than libtinfow, leads to segfaults.
Issue #1174: Check for the libtinfow library when ncursesw is being u…
Fix merged to master, and backported to the 1.3.7 branch. Thanks! |
Thank you for your continuation and the time you spend in the analysis! I may rise an Issue and Pull Request for a so called "bumped" ebuild at the Gentoo Portage Git right after you release the backport (as 1.3.7b?). Please give me a notice. For your reference: ProFTPd the is run at German National Library as a frontend for two B2B services. At a first vhost, the german publishers deliver their electronic publications. At a second, we offer library catalogue and other business data to other German subordinated libraries. |
@gjaekel I reported this downstream and we've backported it. Big thanks to both you and @Castaglia! |
@thesamesam Thank you for jumping in! I was to busy at work last days to file it at Gentoo. |
What I Did
when starting ftptop, nothing but a segfault occurs.
All the other binaries seem to work. With previous installed proftp V1.3.6b,
ftptop
(V0.9) had worked.What I Expected/Wanted
ftptop working. 😄
ProFTPD Version and Configuration
proftp 1.3.7 @ Gentoo
The text was updated successfully, but these errors were encountered: