LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-15-2024, 10:13 AM   #1
phalange
Member
 
Registered: May 2018
Distribution: Slackware, FreeBSD, Debian
Posts: 355

Rep: Reputation: 184Reputation: 184
runtime malloc error on C wm spectrwm


This WM called spectrwm is in C. Version 3.5+ builds ok on Slack 15 but startx results in a runtime malloc() error.

Anyone know where I can get more detail about what's breaking here? I can open a bug report, but I'd like to figure out if this is something strange with slackware.
 
Old 04-15-2024, 05:19 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
From what little that you posted.

https://github.com/conformal/spectrwm
https://www.tutorialspoint.com/c_sta...ion_malloc.htm
https://www.geeksforgeeks.org/dynami...e-and-realloc/

Post the complete error/errors that you are getting. You don't get any compile errors?
 
Old 04-16-2024, 01:07 AM   #3
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 961

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
When malloc fails it usually means that you somehow has run out of RAM. That could be because of a memory leak which tools like valgrind are good at detecting.

However, if you are not willing to do the bug hunting yourself to later provide a bugfix patch a simpler solution might be to look for a more stable window manager. The web page for spectrwm mentions two other window managers and to me it also looks very much like the i3 window manager which I haven't used myself but know some people that prefer it. https://slackbuilds.org/repository/15.0/desktop/i3/

regards Henrik
 
Old 04-16-2024, 01:23 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,863

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
I don't really think it is a bug in slackware (which is not impossible but highly unlikely). I'm curious what do you want to write in that bug report?
Anyway, would be nice to see more. At least the full error message you got (and build log probably). (see post #2)
 
Old 04-16-2024, 01:37 AM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
Quote:
Originally Posted by phalange View Post
This WM called spectrwm is in C. Version 3.5+ builds ok on Slack 15 but startx results in a runtime malloc() error.

Anyone know where I can get more detail about what's breaking here? I can open a bug report, but I'd like to figure out if this is something strange with slackware.
FWIW I found this (it's in their issue tracker)

https://github.com/conformal/spectrwm/issues/567

Last edited by ponce; 04-16-2024 at 01:40 AM.
 
Old 04-17-2024, 08:07 AM   #6
phalange
Member
 
Registered: May 2018
Distribution: Slackware, FreeBSD, Debian
Posts: 355

Original Poster
Rep: Reputation: 184Reputation: 184
Thanks for the replies.

I posted to SBo group, but it seems to run on some one else's system. Myself, I'm running a vanilla full install of Slack15.

Quote:
Originally Posted by pan64 View Post
I'm curious what do you want to write in that bug report?
That's part of the problem. The error message offers little and the issue is not universal.

Quote:
Originally Posted by ponce View Post
FWIW I found this (it's in their issue tracker)

https://github.com/conformal/spectrwm/issues/567
Thank you ponce I added mine to that thread too.

The xorg log is

Code:
X.Org X Server 1.20.14
X Protocol Version 11, Revision 0
Build Operating System: Slackware 15.0 Slackware Linux Project
Current Operating System: Linux slack-t470s.localdomain 5.15.145 #1 SMP PREEMPT Sun Dec 24 00:07:06 CST 2023 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-huge-5.15.145 root=/dev/mapper/slackvg-slackware ro
Build Date: 03 April 2024  05:19:08PM

Current version of pixman: 0.40.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Apr 15 21:28:05 2024
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
spectrwm: Welcome to spectrwm V3.5.1 Build: 3.5.1
malloc(): invalid size (unsorted)
xinit: connection to X server lost

waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.
 
Old 04-17-2024, 02:03 PM   #7
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 961

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
That error does not sound like you are running out of memory. It rather sounds as if the application somehow has broken its heap memory. Running valgrind on such an application compiled with debug symbols will probably quickly point to the bug.

regards Henrik
 
Old 04-18-2024, 01:01 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,863

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
https://stackoverflow.com/questions/...-size-unsorted
here is a similar issue, just to see how can it be analyzed.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] compiler claims memory that was already malloc-ed was not malloc-ed andrew.comly Programming 6 06-08-2020 10:10 AM
[SOLVED] Plasmashell keeps crashing (Slackware 14.2 / ktown) / "wrong ownership on runtime directory /tmp/xdg-runtime-root" Fission Chips Slackware 3 02-26-2020 12:07 PM
compton + spectrwm: Transparency not working... linuxlicious Linux - Desktop 6 06-11-2016 01:53 AM
[SOLVED] C malloc() runtime assertion problems (gcc v4.4.5, target: x86_68-linux-gnu) Snark1994 Programming 5 12-24-2010 12:12 AM
gdbm malloc error Sammy2ooo Linux - Software 0 11-07-2003 04:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration