Segmentation fault with echoping Announcing the arrival of Valued Associate #679: Cesar...
Unix AIX passing variable and arguments to expect and spawn
Why did Europeans not widely domesticate foxes?
2 sample t test for sample sizes - 30,000 and 150,000
Do chord progressions usually move by fifths?
What is the difference between 准时 and 按时?
Does GDPR cover the collection of data by websites that crawl the web and resell user data
What came first? Venom as the movie or as the song?
What is the definining line between a helicopter and a drone a person can ride in?
Trying to enter the Fox's den
Why do some non-religious people reject artificial consciousness?
lm and glm function in R
A journey... into the MIND
“Since the train was delayed for more than an hour, passengers were given a full refund.” – Why is there no article before “passengers”?
Why is one lightbulb in a string illuminated?
Can a Wizard take the Magic Initiate feat and select spells from the Wizard list?
When speaking, how do you change your mind mid-sentence?
Is there a way to convert Wolfram Language expression to string?
Coin Game with infinite paradox
Reflections in a Square
How can I introduce the names of fantasy creatures to the reader?
How to leave only the following strings?
Can the van der Waals coefficients be negative in the van der Waals equation for real gases?
Why aren't these two solutions equivalent? Combinatorics problem
Lights are flickering on and off after accidentally bumping into light switch
Segmentation fault with echoping
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionSegmentation fault with dialogImagemagick segmentation-faultRunning application ends with “Segmentation Fault”Debian Segmentation FaultError - Segmentation FaultSegfault trying to access Users in Settingssegmentation fault with glxgears [solved]Mysql segfaulting when used from the shellParole - Segmentation fault (core dumped)tracking segfault upon invocation of perl script (mytop tool and similar)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I'm testing smokeping's DNS probes with the echoping program as per the documentation, but for me this is causing a segmentation fault when the command is executed by smokeping. I grabbed the command that smokeping is trying to run from systemctl status smokeping.service and tried to run it myself as my normal user and root:
echoping -w 1 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.com -t AAAA --tcp facebook.com
It exits due to a: Segmentation fault (core dumped)
strace output is here.
The distribution of my test box is Arch Linux 4.20 kernel. I've tested this on LTS kernel 4.19 too which is also unsuccessful.
Any ideas?
EDIT:
Actual command smokeping is trying to run:
echoping -w 1 -P 0xa0 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.com -t AAAA --tcp facebook.com
(I missed the -P 0xa0 because I tried omitting the flag before posting but should have copied the command prior to the most recent that I ran...)
UPDATE:
backtrace from the core dump:
$ gdb /usr/bin/echoping core.27236
GNU gdb (GDB) 8.2.1
...
Reading symbols from /usr/bin/echoping...(no debugging symbols found)...done.
[New LWP 27236]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `echoping -w 1 -P 0xa0 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.c'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f73c938246a in init () from /usr/lib/echoping/dns.so
(gdb) backtrace full
#0 0x00007f73c938246a in init () from /usr/lib/echoping/dns.so
No symbol table info available.
#1 0x0000564855557d58 in main ()
No symbol table info available.
linux arch-linux segmentation-fault
add a comment |
I'm testing smokeping's DNS probes with the echoping program as per the documentation, but for me this is causing a segmentation fault when the command is executed by smokeping. I grabbed the command that smokeping is trying to run from systemctl status smokeping.service and tried to run it myself as my normal user and root:
echoping -w 1 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.com -t AAAA --tcp facebook.com
It exits due to a: Segmentation fault (core dumped)
strace output is here.
The distribution of my test box is Arch Linux 4.20 kernel. I've tested this on LTS kernel 4.19 too which is also unsuccessful.
Any ideas?
EDIT:
Actual command smokeping is trying to run:
echoping -w 1 -P 0xa0 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.com -t AAAA --tcp facebook.com
(I missed the -P 0xa0 because I tried omitting the flag before posting but should have copied the command prior to the most recent that I ran...)
UPDATE:
backtrace from the core dump:
$ gdb /usr/bin/echoping core.27236
GNU gdb (GDB) 8.2.1
...
Reading symbols from /usr/bin/echoping...(no debugging symbols found)...done.
[New LWP 27236]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `echoping -w 1 -P 0xa0 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.c'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f73c938246a in init () from /usr/lib/echoping/dns.so
(gdb) backtrace full
#0 0x00007f73c938246a in init () from /usr/lib/echoping/dns.so
No symbol table info available.
#1 0x0000564855557d58 in main ()
No symbol table info available.
linux arch-linux segmentation-fault
What does the backtrace in the coredump say? It's unlikely that the SEGV is from a system call.
– Chris Down
4 hours ago
@ChrisDown as it happens I'm not seeing a core dump in the cwd. Is the dump placed elsewhere?
– unkle_junky
4 hours ago
@ChrisDown just reading this: stackoverflow.com/questions/2065912/… so I'll update when I figure out where the core dump goes.
– unkle_junky
3 hours ago
@ChrisDown I've updated the question with the backtrace.
– unkle_junky
3 hours ago
add a comment |
I'm testing smokeping's DNS probes with the echoping program as per the documentation, but for me this is causing a segmentation fault when the command is executed by smokeping. I grabbed the command that smokeping is trying to run from systemctl status smokeping.service and tried to run it myself as my normal user and root:
echoping -w 1 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.com -t AAAA --tcp facebook.com
It exits due to a: Segmentation fault (core dumped)
strace output is here.
The distribution of my test box is Arch Linux 4.20 kernel. I've tested this on LTS kernel 4.19 too which is also unsuccessful.
Any ideas?
EDIT:
Actual command smokeping is trying to run:
echoping -w 1 -P 0xa0 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.com -t AAAA --tcp facebook.com
(I missed the -P 0xa0 because I tried omitting the flag before posting but should have copied the command prior to the most recent that I ran...)
UPDATE:
backtrace from the core dump:
$ gdb /usr/bin/echoping core.27236
GNU gdb (GDB) 8.2.1
...
Reading symbols from /usr/bin/echoping...(no debugging symbols found)...done.
[New LWP 27236]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `echoping -w 1 -P 0xa0 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.c'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f73c938246a in init () from /usr/lib/echoping/dns.so
(gdb) backtrace full
#0 0x00007f73c938246a in init () from /usr/lib/echoping/dns.so
No symbol table info available.
#1 0x0000564855557d58 in main ()
No symbol table info available.
linux arch-linux segmentation-fault
I'm testing smokeping's DNS probes with the echoping program as per the documentation, but for me this is causing a segmentation fault when the command is executed by smokeping. I grabbed the command that smokeping is trying to run from systemctl status smokeping.service and tried to run it myself as my normal user and root:
echoping -w 1 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.com -t AAAA --tcp facebook.com
It exits due to a: Segmentation fault (core dumped)
strace output is here.
The distribution of my test box is Arch Linux 4.20 kernel. I've tested this on LTS kernel 4.19 too which is also unsuccessful.
Any ideas?
EDIT:
Actual command smokeping is trying to run:
echoping -w 1 -P 0xa0 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.com -t AAAA --tcp facebook.com
(I missed the -P 0xa0 because I tried omitting the flag before posting but should have copied the command prior to the most recent that I ran...)
UPDATE:
backtrace from the core dump:
$ gdb /usr/bin/echoping core.27236
GNU gdb (GDB) 8.2.1
...
Reading symbols from /usr/bin/echoping...(no debugging symbols found)...done.
[New LWP 27236]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `echoping -w 1 -P 0xa0 -p 6 -t 1 -6 -m /usr/lib/echoping/dns.so -n 20 facebook.c'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f73c938246a in init () from /usr/lib/echoping/dns.so
(gdb) backtrace full
#0 0x00007f73c938246a in init () from /usr/lib/echoping/dns.so
No symbol table info available.
#1 0x0000564855557d58 in main ()
No symbol table info available.
linux arch-linux segmentation-fault
linux arch-linux segmentation-fault
edited 3 hours ago
unkle_junky
asked 4 hours ago
unkle_junkyunkle_junky
12816
12816
What does the backtrace in the coredump say? It's unlikely that the SEGV is from a system call.
– Chris Down
4 hours ago
@ChrisDown as it happens I'm not seeing a core dump in the cwd. Is the dump placed elsewhere?
– unkle_junky
4 hours ago
@ChrisDown just reading this: stackoverflow.com/questions/2065912/… so I'll update when I figure out where the core dump goes.
– unkle_junky
3 hours ago
@ChrisDown I've updated the question with the backtrace.
– unkle_junky
3 hours ago
add a comment |
What does the backtrace in the coredump say? It's unlikely that the SEGV is from a system call.
– Chris Down
4 hours ago
@ChrisDown as it happens I'm not seeing a core dump in the cwd. Is the dump placed elsewhere?
– unkle_junky
4 hours ago
@ChrisDown just reading this: stackoverflow.com/questions/2065912/… so I'll update when I figure out where the core dump goes.
– unkle_junky
3 hours ago
@ChrisDown I've updated the question with the backtrace.
– unkle_junky
3 hours ago
What does the backtrace in the coredump say? It's unlikely that the SEGV is from a system call.
– Chris Down
4 hours ago
What does the backtrace in the coredump say? It's unlikely that the SEGV is from a system call.
– Chris Down
4 hours ago
@ChrisDown as it happens I'm not seeing a core dump in the cwd. Is the dump placed elsewhere?
– unkle_junky
4 hours ago
@ChrisDown as it happens I'm not seeing a core dump in the cwd. Is the dump placed elsewhere?
– unkle_junky
4 hours ago
@ChrisDown just reading this: stackoverflow.com/questions/2065912/… so I'll update when I figure out where the core dump goes.
– unkle_junky
3 hours ago
@ChrisDown just reading this: stackoverflow.com/questions/2065912/… so I'll update when I figure out where the core dump goes.
– unkle_junky
3 hours ago
@ChrisDown I've updated the question with the backtrace.
– unkle_junky
3 hours ago
@ChrisDown I've updated the question with the backtrace.
– unkle_junky
3 hours ago
add a comment |
1 Answer
1
active
oldest
votes
That's simply a bug in echoping(1), and you should go report it (after checking if they hadn't already fixed it in the last version).
In the util.c file from its source code, they have this little c-x-er:
char *
to_upper(char *input)
{
int c;
char *result;
result = (char *) malloc(strlen(input));
for (c = 0; c < strlen(input); c++)
result[c] = toupper((int)input[c]);
result[strlen(input)] = '';
return result;
}
Notice how result[strlen(input)] will write 1 byte beyond the length of the buffer allocated with malloc().
But that's not all; instead of declaring the correct prototype of to_upper() (which returns a 64 bit pointer on x86-64), they let the compiler assume that it returns a 32 bit int and force cast its return value to (char*) in plugins/dns/dns.c:
char *
init(const int argc, const char **argv)
{
...
upper_type_name = (char *) to_upper(type_name);
This latter really kills it, and I don't think that has ever run on x86-64; your only hope is to configure your system as multiarch and install echoping as a 32bit binary; example (not tested) for debian:
apt-get remove echoping
dpkg --add-architecture i386
apt-get update
apt-get install echoping:i386
[I've used the sources of echoping-6.0.2, that I've got with apt-get source echoping in debian 9.]
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f513895%2fsegmentation-fault-with-echoping%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
That's simply a bug in echoping(1), and you should go report it (after checking if they hadn't already fixed it in the last version).
In the util.c file from its source code, they have this little c-x-er:
char *
to_upper(char *input)
{
int c;
char *result;
result = (char *) malloc(strlen(input));
for (c = 0; c < strlen(input); c++)
result[c] = toupper((int)input[c]);
result[strlen(input)] = '';
return result;
}
Notice how result[strlen(input)] will write 1 byte beyond the length of the buffer allocated with malloc().
But that's not all; instead of declaring the correct prototype of to_upper() (which returns a 64 bit pointer on x86-64), they let the compiler assume that it returns a 32 bit int and force cast its return value to (char*) in plugins/dns/dns.c:
char *
init(const int argc, const char **argv)
{
...
upper_type_name = (char *) to_upper(type_name);
This latter really kills it, and I don't think that has ever run on x86-64; your only hope is to configure your system as multiarch and install echoping as a 32bit binary; example (not tested) for debian:
apt-get remove echoping
dpkg --add-architecture i386
apt-get update
apt-get install echoping:i386
[I've used the sources of echoping-6.0.2, that I've got with apt-get source echoping in debian 9.]
add a comment |
That's simply a bug in echoping(1), and you should go report it (after checking if they hadn't already fixed it in the last version).
In the util.c file from its source code, they have this little c-x-er:
char *
to_upper(char *input)
{
int c;
char *result;
result = (char *) malloc(strlen(input));
for (c = 0; c < strlen(input); c++)
result[c] = toupper((int)input[c]);
result[strlen(input)] = '';
return result;
}
Notice how result[strlen(input)] will write 1 byte beyond the length of the buffer allocated with malloc().
But that's not all; instead of declaring the correct prototype of to_upper() (which returns a 64 bit pointer on x86-64), they let the compiler assume that it returns a 32 bit int and force cast its return value to (char*) in plugins/dns/dns.c:
char *
init(const int argc, const char **argv)
{
...
upper_type_name = (char *) to_upper(type_name);
This latter really kills it, and I don't think that has ever run on x86-64; your only hope is to configure your system as multiarch and install echoping as a 32bit binary; example (not tested) for debian:
apt-get remove echoping
dpkg --add-architecture i386
apt-get update
apt-get install echoping:i386
[I've used the sources of echoping-6.0.2, that I've got with apt-get source echoping in debian 9.]
add a comment |
That's simply a bug in echoping(1), and you should go report it (after checking if they hadn't already fixed it in the last version).
In the util.c file from its source code, they have this little c-x-er:
char *
to_upper(char *input)
{
int c;
char *result;
result = (char *) malloc(strlen(input));
for (c = 0; c < strlen(input); c++)
result[c] = toupper((int)input[c]);
result[strlen(input)] = '';
return result;
}
Notice how result[strlen(input)] will write 1 byte beyond the length of the buffer allocated with malloc().
But that's not all; instead of declaring the correct prototype of to_upper() (which returns a 64 bit pointer on x86-64), they let the compiler assume that it returns a 32 bit int and force cast its return value to (char*) in plugins/dns/dns.c:
char *
init(const int argc, const char **argv)
{
...
upper_type_name = (char *) to_upper(type_name);
This latter really kills it, and I don't think that has ever run on x86-64; your only hope is to configure your system as multiarch and install echoping as a 32bit binary; example (not tested) for debian:
apt-get remove echoping
dpkg --add-architecture i386
apt-get update
apt-get install echoping:i386
[I've used the sources of echoping-6.0.2, that I've got with apt-get source echoping in debian 9.]
That's simply a bug in echoping(1), and you should go report it (after checking if they hadn't already fixed it in the last version).
In the util.c file from its source code, they have this little c-x-er:
char *
to_upper(char *input)
{
int c;
char *result;
result = (char *) malloc(strlen(input));
for (c = 0; c < strlen(input); c++)
result[c] = toupper((int)input[c]);
result[strlen(input)] = '';
return result;
}
Notice how result[strlen(input)] will write 1 byte beyond the length of the buffer allocated with malloc().
But that's not all; instead of declaring the correct prototype of to_upper() (which returns a 64 bit pointer on x86-64), they let the compiler assume that it returns a 32 bit int and force cast its return value to (char*) in plugins/dns/dns.c:
char *
init(const int argc, const char **argv)
{
...
upper_type_name = (char *) to_upper(type_name);
This latter really kills it, and I don't think that has ever run on x86-64; your only hope is to configure your system as multiarch and install echoping as a 32bit binary; example (not tested) for debian:
apt-get remove echoping
dpkg --add-architecture i386
apt-get update
apt-get install echoping:i386
[I've used the sources of echoping-6.0.2, that I've got with apt-get source echoping in debian 9.]
edited 1 hour ago
answered 2 hours ago
mosvymosvy
10.6k11338
10.6k11338
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f513895%2fsegmentation-fault-with-echoping%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What does the backtrace in the coredump say? It's unlikely that the SEGV is from a system call.
– Chris Down
4 hours ago
@ChrisDown as it happens I'm not seeing a core dump in the cwd. Is the dump placed elsewhere?
– unkle_junky
4 hours ago
@ChrisDown just reading this: stackoverflow.com/questions/2065912/… so I'll update when I figure out where the core dump goes.
– unkle_junky
3 hours ago
@ChrisDown I've updated the question with the backtrace.
– unkle_junky
3 hours ago