473,657 Members | 2,996 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help! SIGBUS (object specifc hardware error) when call function getline

Hi,

We have several core dumps in our product. These core dump can be
reproduced in the same place. That is system function call
std::basic_istr eam<char,std::c har_traits<char >>::getline. The result of

pstack for the core dump is

pstack core | c++filt

core 'core of 12214: ../bin/QBE_V5 -X 30017
ffffffff7b94431 8 __type_0 std::__find_if< const
char*,std::_Eq_ char_bound<std: :char_traits<ch ar> >
(__type_0,__ty pe_0,__type_1,c onst std::random_acc ess_iterator_ta g&) (ffffffff7a000b c7, ffffffff7a0014f d, a00000000000001 , ffffffff7a0014f d, a, 936) +20

ffffffff7b952c1 8 long
std::_M_read_bu ffered<char,std ::char_traits<c har>,std::_Eq_c har_bound<std:: *char_traits<ch ar>

,std::_Scan_fo r_char_val<std: :char_traits<ch ar> > >(std::basic_is tream<__type_0, __type_1>*,std: :basic_streambu f<__type_0,__ty *pe_1>*,long,__ type_0*,__type_ 2,__type_3,bool ,bool,bool) (ffffffff7a000b c7, 1001e7170, 3ff, 100243bd0, 0, a00000000000005 ) + 84

ffffffff7b9537c 4 std::istream &std::istream:: getline(char*,l ong,char)
(1001e7160, 100243bd0, 400, a, 1001e7160, 0) + 7c
ffffffff7e6b905 c int Service::readOb j(std::ifstream
&,XEPersistentO bj*&) (1001e7160, ffffffff7ffff2a 8, 2, 188d04,
ffffffff7bac93b 8, 10) + 54
000000010001df0 8 int initialize(unsi gned) (1001ce030, 0, 1001ce1d0,
1001ce1d0, 3400, 1) + 660
000000010002c37 c main (3, ffffffff7ffffac 8, ffffffffffecb89 8,
1001bb020, 1001959e8, 134400) + ac
000000010001b6d c _start (0, 0, 0, 0, 0, 0) + 17c
When we debug it with dbx, dbx tells us it's a object specific hardware

error, SIG_BUS error. The result of dbx is
t@null <mailto:t@nul l> (l@1 <mailto:l@1> ) program terminated by
signal BUS (object specific hardware error)
0xffffffff7b944 318: __find_if+0x002 0: ldsb [%o4], %o0
(dbx) regs
current thread: t@null <mailto:t@nul l>
current frame: [1]
g0-g1 0x0000000000000 000 0xffffffff7b953 748
g2-g3 0x0000000000000 000 0x000000010022a e0c
g4-g5 0x0000000000000 001 0x0000000000000 936
g6-g7 0x0000000000000 000 0xffffffff7de02 000
o0-o1 0xffffffff7a000 bc7 0xffffffff7a001 4fd
o2-o3 0x0000000000000 00a 0xffffffff7fffe bbe
o4-o5 0xffffffff7a000 bc7 0x0000000000000 24d
o6-o7 0xffffffff7fffe 221 0xffffffff7b944 2e8
l0-l1 0xffffffff7de02 000 0x0000000000000 000
l2-l3 0x000000010023e f40 0xffffffff7b3eb ec4
l4-l5 0x0000000000000 000 0x0000000000000 000
l6-l7 0x0000000000000 001 0x0000000000000 000
i0-i1 0xffffffff7a000 bc7 0xffffffff7a001 4fd
i2-i3 0x0a00000000000 001 0xffffffff7a001 4fd
i4-i5 0x0000000000000 00a 0x0000000000000 936
i6-i7 0xffffffff7fffe 3c1 0xffffffff7b952 c18
y 0x0000000000000 000
ccr 0x0000000000000 044
pc 0xffffffff7b944 318:__find_if+0 x20 ldsb [%o4], %o0
npc 0xffffffff7b944 31c:__find_if+0 x24 cmp %o0, %o2
(dbx) examine $o4 /s
dbx: warning: unknown language, 'c' assumed
0xffffffff7a000 bc7: "EngineCkptInpu t 99 f " ...

int Service::readOb j( ifstream& strm, XEPersistentObj *& retObj )
{
char* tmp=0;
tmp = new char [BUFSIZ];
strm.getline(tm p,BUFSIZ);
Looking at code, we can not find any suspecting place. It's a pure
system call. I searched similar case through google and got two link
http://groups.google.com/group/comp...._thread/thread...

and
http://groups.google.com/group/comp...._thread/thread....

A SUN engineer said, "It's an error returned by software somewhere deep

down the VM system's hat layer; without knowledge of the mapping at the

address, how it was accessed, it's hard to tell what really is the
matter. Basically, the HAT layer is very low-level part of the virtual
memory system. HAT information describes how a memory page is mapped
on the physical side of the VM (i.e. RAM). " He also suggested "Start
by finding out which address is giving the problem, which instruction
is using the address and how. "
In the implementation of function getline, a large buffer will be
allocated and data will be loaded into the buffer. Then data will be
continuously compared with a required char. The ldsb loads bytes from
the big buffer to register. After loading a byte from register o4 to
o0, the data in register o4 and o2 will be compared to check if
condition is meet.
According to sun sparc instruction, ldsb instruction is used to load a
signed byte from memory into register. It can't cause the core dump of
memory address alignment. The address giving the problem also shows
correct content loading from the services.dat with the dbx command
"examine". So we really don't know why the core dump happened.
Our product will be delivered to customer in few days. It's greatly
urgent for us. Your input and help will be highly appreciated by us.
P.S. OS version is Solaris 10 64bit.
% /usr/platform/sun4u/sbin/prtdiag
System Configuration: Sun Microsystems sun4u Netra t 1400/1405 (4 X
UltraSPARC-II 440MHz)
System clock frequency: 110 MHz
Memory size: 4096 Megabytes
Best Regards
Leslie

Mar 2 '06 #1
4 4848

This is WAY off topic here.

OK OK - here is the hint.

ffffffff7a000bc 7 - is not aligned. I have no idea why "ldsb" would
cause an issue with this location, however it appears to be the address
of the basic_istream structure (which would be very odd - no pun
intended). It may be caused by the previous instruction.
wq*****@hotmail .com wrote:
Hi,

We have several core dumps in our product. These core dump can be
reproduced in the same place. That is system function call
std::basic_istr eam<char,std::c har_traits<char >>::getline. The result of

pstack for the core dump is
pstack core | c++filt


core 'core of 12214: ../bin/QBE_V5 -X 30017
ffffffff7b94431 8 __type_0 std::__find_if< const
char*,std::_Eq_ char_bound<std: :char_traits<ch ar> >
(__type_0,__t ype_0,__type_1, const std::random_acc ess_iterator_ta g&) (ffffffff7a000b c7, ffffffff7a0014f d, a00000000000001 , ffffffff7a0014f d, a, 936) + 20


ffffffff7b952c1 8 long
std::_M_read_bu ffered<char,std ::char_traits<c har>,std::_Eq_c har_bound<std:: Â*char_traits<c har>

,std::_Scan_f or_char_val<std ::char_traits<c har> > >(std::basic_is tream<__type_0, __type_1>*,std: :basic_streambu f<__type_0,__ty Â*pe_1>*,long,_ _type_0*,__type _2,__type_3,boo l,bool,bool) (ffffffff7a000b c7, 1001e7170, 3ff, 100243bd0, 0, a00000000000005 ) + 84


ffffffff7b9537c 4 std::istream &std::istream:: getline(char*,l ong,char)
(1001e7160, 100243bd0, 400, a, 1001e7160, 0) + 7c
ffffffff7e6b905 c int Service::readOb j(std::ifstream
&,XEPersistentO bj*&) (1001e7160, ffffffff7ffff2a 8, 2, 188d04,
ffffffff7bac93b 8, 10) + 54
000000010001df0 8 int initialize(unsi gned) (1001ce030, 0, 1001ce1d0,
1001ce1d0, 3400, 1) + 660
000000010002c37 c main (3, ffffffff7ffffac 8, ffffffffffecb89 8,
1001bb020, 1001959e8, 134400) + ac
000000010001b6d c _start (0, 0, 0, 0, 0, 0) + 17c
When we debug it with dbx, dbx tells us it's a object specific hardware

error, SIG_BUS error. The result of dbx is
t@null <mailto:t@nul l> (l@1 <mailto:l@1> ) program terminated by
signal BUS (object specific hardware error)
0xffffffff7b944 318: __find_if+0x002 0: ldsb [%o4], %o0
(dbx) regs
current thread: t@null <mailto:t@nul l>
current frame: [1]
g0-g1 0x0000000000000 000 0xffffffff7b953 748
g2-g3 0x0000000000000 000 0x000000010022a e0c
g4-g5 0x0000000000000 001 0x0000000000000 936
g6-g7 0x0000000000000 000 0xffffffff7de02 000
o0-o1 0xffffffff7a000 bc7 0xffffffff7a001 4fd
o2-o3 0x0000000000000 00a 0xffffffff7fffe bbe
o4-o5 0xffffffff7a000 bc7 0x0000000000000 24d
o6-o7 0xffffffff7fffe 221 0xffffffff7b944 2e8
l0-l1 0xffffffff7de02 000 0x0000000000000 000
l2-l3 0x000000010023e f40 0xffffffff7b3eb ec4
l4-l5 0x0000000000000 000 0x0000000000000 000
l6-l7 0x0000000000000 001 0x0000000000000 000
i0-i1 0xffffffff7a000 bc7 0xffffffff7a001 4fd
i2-i3 0x0a00000000000 001 0xffffffff7a001 4fd
i4-i5 0x0000000000000 00a 0x0000000000000 936
i6-i7 0xffffffff7fffe 3c1 0xffffffff7b952 c18
y 0x0000000000000 000
ccr 0x0000000000000 044
pc 0xffffffff7b944 318:__find_if+0 x20 ldsb [%o4], %o0
npc 0xffffffff7b944 31c:__find_if+0 x24 cmp %o0, %o2
(dbx) examine $o4 /s
dbx: warning: unknown language, 'c' assumed
0xffffffff7a000 bc7: "EngineCkptInpu t 99 f " ...

int Service::readOb j( ifstream& strm, XEPersistentObj *& retObj )
{
char* tmp=0;
tmp = new char [BUFSIZ];
strm.getline(tm p,BUFSIZ);
Looking at code, we can not find any suspecting place. It's a pure
system call. I searched similar case through google and got two link
http://groups.google.com/group/comp...._thread/thread...

and
http://groups.google.com/group/comp...._thread/thread....

A SUN engineer said, "It's an error returned by software somewhere deep

down the VM system's hat layer; without knowledge of the mapping at the

address, how it was accessed, it's hard to tell what really is the
matter. Basically, the HAT layer is very low-level part of the virtual
memory system. HAT information describes how a memory page is mapped
on the physical side of the VM (i.e. RAM). " He also suggested "Start
by finding out which address is giving the problem, which instruction
is using the address and how. "
In the implementation of function getline, a large buffer will be
allocated and data will be loaded into the buffer. Then data will be
continuously compared with a required char. The ldsb loads bytes from
the big buffer to register. After loading a byte from register o4 to
o0, the data in register o4 and o2 will be compared to check if
condition is meet.
According to sun sparc instruction, ldsb instruction is used to load a
signed byte from memory into register. It can't cause the core dump of
memory address alignment. The address giving the problem also shows
correct content loading from the services.dat with the dbx command
"examine". So we really don't know why the core dump happened.
Our product will be delivered to customer in few days. It's greatly
urgent for us. Your input and help will be highly appreciated by us.
P.S. OS version is Solaris 10 64bit.
% /usr/platform/sun4u/sbin/prtdiag
System Configuration: Sun Microsystems sun4u Netra t 1400/1405 (4 X
UltraSPARC-II 440MHz)
System clock frequency: 110 MHz
Memory size: 4096 Megabytes
Best Regards
Leslie

Mar 2 '06 #2
can you explain it more? why do you think it's due to another
instruction. I think every time core dump file records the exact core
position.

Mar 2 '06 #3
wq*****@hotmail .com wrote:
can you explain it more? why do you think it's due to another
instruction. I think every time core dump file records the exact core
position.


Perhaps, perhaps not.

Still, you have an unaligned struct. Why ?
Mar 2 '06 #4
no. unlign struct is not in my code. It's in Solaris system call
getline. When I call getline, address of the input parameter is
100243bd0, which is aligned. In function getline, character will be
compared one by one. So it will point a odd address, which looks like
unaligned.

Mar 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
6105
by: mattigiat | last post by:
Sorry for being such a newbie in this respect, but here's my question: I have Visual Studio, with VB6 ent., with msdn help installed. Is there any way to downgrade to just using the VB5 help, on the VB6 app? I too am not on board with "more help than you ever imagined, or wanted" approach, and don't like msdn. I read dozens of postings last night, with so many people remarking the msdn help format is too distracting and unhelpful. I...
21
6529
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help Workshop program: hcw.exe that's included with Visual Basic. This exact same file compiled perfectly with no notes, warnings or errors prior to reformatting my system. Prior to the reformatting, I copied the help.rtf file onto a CD and checked the box to...
10
2264
by: Jacek Generowicz | last post by:
Where can I find concise, clear documentation describing what one has to do in order to enable Python's internal help to be able to provide descriptions of Python keywords ? I am in a situation where I have to give Python novices the ability to fix this for themselves easily. Failing "concise" and "clear", how about "complete and correct" ?
2
1909
by: Nora | last post by:
Hi there! We have created a dtd. Now, when creating xml files based on this dtd we want to provide an own online help. (This online help explains: which tag can be used where, writing schemas, structure (parents, children), ...) We might change to XMeltaL. But therefore I have a few questions:
3
1666
by: Woody Splawn | last post by:
For reasons I have not yet identified I am having problems with the help system in VS.net 2003. It seems as though it was working all right in the past but it's not now. First of all I can't seem to get my search and help icons to stay on the screen when in VS. In order to access the search dialog I have to access the help menu and then select the search icon from there. Once clicked and the dialog retrieved I type in a word to search...
6
3006
by: d.warnermurray | last post by:
I am doing a project for school that involves creating help files for a html authoring tool. If you could help me with answers to some questions it would really help. 1. What tasks do you expect an html authoring tool to help you accomplish? 2. What do you expect from online help for a html authoring tool? 3. What audience do you think a freeware html authoring tool is directed towards?
0
1498
by: Yabedabe | last post by:
Hello there, I have a strange problem (possible bug?) to display two HTML Help files at the same time. To reproduce this problem. Create a new VB.Net solution. Place two buttons on the form. Create two button_click events with the following code in it For button1 Help.ShowHelpIndex(Me, "C:\Temp\File1 mspaint.chm")
3
2440
by: stuart_white_ | last post by:
I've just upgraded from Python 2.3.3 to Python 2.4.2, and, although the new version of Python seems to be running correctly, I can't seem access the help from the interpreter. On Python 2.3.3 --------------- Python 2.3.3 (#51, Dec 18 2003, 20:22:39) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import time
9
2242
by: JJ | last post by:
Do you all use HTML help workshop to create your help system. I am finding it quite clumsy to use. Mayeb because I am not used to using it. Do any of you use any other techniques to create help for your progs? Whats the current popular approach to creating help? I am only wanting a straight help file accessible from a menu - no context sensitive stuff. TIA
4
2249
by: Fred Flintstone | last post by:
This one baffles me. I'm using VS.Net 2005 and write desktop apps that need built in help. So logically, I figure maybe VS has a help system component built in so I search the help. Hey! Apparently, all I have to do is create a "Help Project"! There's my starting point. So the VS help says: "To create a Help project, click on the File menu, choose New and follow the wizard's instructions"
0
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8820
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.