Coder Social home page Coder Social logo

Segmentation fault when installing about sw HOT 19 CLOSED

nelimee avatar nelimee commented on July 19, 2024
Segmentation fault when installing

from sw.

Comments (19)

egorpugin avatar egorpugin commented on July 19, 2024 1

You could try to run debug build:
https://www.dropbox.com/s/f95cgvfic18qyev/sw.client.sw-0.3.1?dl=1

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

Uh-oh, I have to upload newer linux build.
Sorry for outdated stuff. I'll ping you here.

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

Ok, I've uploaded new version.
Please, try it.
Also you could check sw --self-upgrade command, which should update binary itself.

from sw.

nelimee avatar nelimee commented on July 19, 2024

Sorry for the delay and thank you for your quick answer!
The segmentation fault is fixed, but sw now outputs:

Exception in file D:/dev/cppan2/client2/src/sw/core/settings.cpp:116, function getValue: empty value for key: c

Output of sw -trace build:

----------------------------------------
Starting sw...
Checking remote version
Detected target: org.gnu.binutils.ar-0.0.1
Detected program: /usr/bin/ar
Detected target: org.gnu.gcc-9.1.0
Detected program: /usr/bin/gcc
Detected target: org.gnu.gpp-9.1.0
Detected program: /usr/bin/g++
Exception in file D:/dev/cppan2/client2/src/sw/core/settings.cpp:116, function getValue: empty value for key: c

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

Is that all? No output between these lines?

Detected program: /usr/bin/g++
Exception in file

Try to add -bt argument:
sw -bt -trace build

from sw.

nelimee avatar nelimee commented on July 19, 2024

Steps performed:

rm -rf ~/.sw/
git clone https://github.com/SoftwareNetwork/sw sw_test
cd sw_test
sw -bt -trace build

The output it exactly the same:

----------------------------------------
Starting sw...
Packages database was not found
Downloading database from origin remote
Detected target: org.gnu.binutils.ar-0.0.1
Detected program: /usr/bin/ar
Detected target: org.gnu.gcc-9.1.0
Detected program: /usr/bin/gcc
Detected target: org.gnu.gpp-9.1.0
Detected program: /usr/bin/g++
Exception in file D:/dev/cppan2/client2/src/sw/core/settings.cpp:116, function getValue: empty value for key: c

Did I forgot to remove something? A cache somewhere?

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

Did I forgot to remove something?

Should not be a problem.

I'll check linux build myself.

from sw.

nelimee avatar nelimee commented on July 19, 2024

Ok, thanks! Let me know if you need anything more from me!

from sw.

nelimee avatar nelimee commented on July 19, 2024

If this can help you, neither sw -help nor sw build -help show a -bt option with the binary you provided.

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

Could you try to catch throw using gdb and print backtrace?

from sw.

nelimee avatar nelimee commented on July 19, 2024

I have this

(gdb) bt
#0  __cxxabiv1::__cxa_throw (obj=0x165dbc0, tinfo=0x148aa50 <typeinfo for sw::RuntimeError>, dest=0x7512a0 <sw::RuntimeError::~RuntimeError()>) at /build/gcc/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:77
#1  0x0000000000853a94 in sw::TargetSetting::getValue[abi:cxx11]() const ()
#2  0x00000000008065eb in sw::SwCoreContext::setHostPrograms() ()
#3  0x00000000008056c3 in sw::SwCoreContext::SwCoreContext(std::filesystem::__cxx11::path const&) ()
#4  0x0000000000807519 in sw::SwContext::SwContext(std::filesystem::__cxx11::path const&) ()
#5  0x00000000008050d7 in createSwContext() ()
#6  0x000000000075e972 in cli_build() ()
#7  0x000000000077f39b in sw_main(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) ()
#8  0x000000000077e892 in setup_main(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) ()
#9  0x000000000077ff33 in parse_main(int, char**) ()
#10 0x0000000000780aa9 in SW_MAIN(int, char**) ()
#11 0x0000000000a8fb8b in PRIMITIVES_MAIN(int, char**) ()
#12 0x0000000000a8f52e in main ()

If you can provide me a version with debug enabled, I think I will be able to step into the program and maybe understand why there is an error. For the moment most of the values I have are "<optimized out>" and "No symbol table info available.".

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

bt

I see. Bt is fine and helpful.
Try to install the latest clang (8 or 9). Sw client was built with clang and sw tries to find clang to have same ABI for host programs.

I'll add more meaningful error message.

If you can provide me a version with debug enabled

Yes, probably I should distribute release with debug info build for linux as I already do for windows.

from sw.

nelimee avatar nelimee commented on July 19, 2024

After installing clang, it works... and it SegFault :(

I did a clean install of sw with

rm -rf ~/.sw
sw -self-upgrade
rm -rf ~/sw_test
git clone https://github.com/SoftwareNetwork/sw ~/sw_test
cd ~/sw_test

and ran

gdb sw
(gdb) r -trace -bt build

The output is here (with the output of bt).

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

After installing clang, it works... and it SegFault :(

Yes, I see it too. Investigating.

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

Oh, looking at your bt...
I saw this ares error inside grpc a lot of times (*nix only). Did not investigate yet.
I'll try to dig into it, but no eta.

You could try to restart sw many times and when it finally download all packages, execution should go further.

from sw.

nelimee avatar nelimee commented on July 19, 2024

It seems to block at org.sw.demo.qtproject.qt.base.tools.moc-5.13.1 for me. I re-started sw 5 times, and it now Segfault each time at the same moment, on the same package.
I don't know sw well for the moment, is there a way to generate a CMakeLists.txt from sw?

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

There's no cmake generator.
Other generators available with sw generate -g ...
https://github.com/SoftwareNetwork/sw/blob/master/src/sw/client/cli/generator/generator.h#L34

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

Of course, no segfault in debug config. Need to check rwdi.

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

Should be fixed now.
Use --self-upgrade or whatever.

The issue: c-ares/c-ares#279
Function does not have return statement.

from sw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.