LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-29-2015, 05:58 AM   #1
sanamit
LQ Newbie
 
Registered: Dec 2015
Posts: 2

Rep: Reputation: Disabled
msgsnd returning with EINVAL for sometimes not everytime, just restart the application


IPC - msgsnd returns EINVAL abnormally. If I restarted the application 10 times, EINVAL gets return 2-3 times only. Not all time.
Is it Red Hat IPC behaviour or what?
My linux system is $ uname -a
Linux ech-10-157-138-117 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
 
Old 12-29-2015, 10:32 AM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,488

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
EINVAL means that system call parameters are erroneous. Looks like your application has an intermittent bug. Print the parameter values to check. If you don't have access to the source code, use strace.
 
Old 12-29-2015, 10:57 AM   #3
sanamit
LQ Newbie
 
Registered: Dec 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
EINVAL means that system call parameters are erroneous. Looks like your application has an intermittent bug. Print the parameter values to check. If you don't have access to the source code, use strace.

Actually if we start application 10 times, out of it only 2 times or 1 times we received the EINVAL error i.e. without code change only. Even I printed all the parameters value, all values are same. Message queue creation, send and receive are JNI code.
 
Old 01-04-2016, 06:56 PM   #4
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,488

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
Happy new year!

Still look for a bug in the app. It's close to impossible that a bug as visible as that is in the kernel without getting fixed immediately.

Even though the parameters might be identical from call to call, there can be errors. For example, even if the msqid has the same value, it might not always refer to a valid message queue.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ssh doesn't work:::had to restart everytime linuxandtsm Linux - Newbie 7 08-02-2011 07:59 PM
why do I have to restart everytime after install each update zhangyiosu Fedora 15 02-07-2007 12:01 PM
everytime restart the system for proxy ? hegdeshashi Linux - Networking 2 01-12-2006 12:20 AM
resolv.conf changing everytime network restart cuco76 Linux - Networking 4 11-29-2004 08:19 PM
Everytime restart MDK, I have to reconfigure my SBLive 5.1 card to get sound Fear58 Linux - Hardware 3 07-12-2004 09:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:45 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration