problem with vbox debug halt

Discussions related to using the OSE version of VirtualBox.

problem with vbox debug halt

Postby ggvbox951 » 21. Jul 2016, 21:46

Hi there I ran into trouble when using the virtualbox's debugging capability.
For the past few weeks I was launching the guest machine with -dbg option and use the step-into/halt/go to inspect the walk through the code that I was running.

However starting yesterday, I ran into weird problem:
I put "jmp $" instruction in the binary I built. When VM starts and launches binary, I use "halt" first and adjust IP by increment by 2 to get out of jmp $ and step-through next instruction. The code was running in the segment 0000:8000h which I set it deliberately. So when I halt, it halts at somewhere around this area, i.e. 0000:8201 etc.,

Yesterday, I halted again and it always halts in different segment: f000:xxxx address. It looks like some kinda of interrupt handler, or similar. I double checked everything to make sure I am using same binary.

I even created new VM but no avail.

But I isolated this issue by setting up Vbox on another machine and create brand new VM and transferred the binary to there.
Only then problem disappeared. By disappeared I meant, the same binary halts in 0000:8000h as expected. But in my other machine that I was doing development, it is always halting in f000:xxxx segment.

I diff-d the debugger console output of new (OK) and old (problematic) and dont see anything suspicious and I blogged this issue in my blog and put the pic of diff below. If you scroll down to bottom of this page and see the last pic, you will see the diff.
http://x86arch.blogspot.com/2016/07/imp ... -3_22.html
ggvbox951
 
Posts: 11
Joined: 24. May 2016, 20:38

Re: problem with vbox debug halt

Postby noteirak » 21. Jul 2016, 21:52

Moved to "VirtualBox OSE"
Hyperbox - Virtual Infrastructure Manager - https://kamax.io/hbox/
Manage your VirtualBox infrastructure the free way!
noteirak
Site Moderator
 
Posts: 5198
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7

Re: problem with vbox debug halt

Postby michaln » 21. Jul 2016, 22:52

F000 is the BIOS segment. So yes, if CS:IP is F000:xxxx the BIOS is executing. Pretty much by definition an interrupt handler, but to find out which handler you'd have to analyze the stack and find out how it was called.

BTW I recommend CLI/HLT for this purpose because then there's no need to edit anything.
michaln
Oracle Corporation
 
Posts: 2958
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: problem with vbox debug halt

Postby ggvbox951 » 22. Jul 2016, 00:32

i would not dig through to find out which interrupt handler might be causing, I am afraid it will be endless search unless something can be determined fairly quickly. Since the binary is booting off diretly from BIOS it must be BIOS code. Therefore I am using top-down approach. Since same binary worked on separate installation I presume something has gone wrong with the first machine.
The reason I put here is if this is a known problem that has been experienced before and whether has anyone seen it and might have a hint.
I might re-install the vbox on the problematic machine again into different folder.

Thanks.,
ggvbox951
 
Posts: 11
Joined: 24. May 2016, 20:38

Re: problem with vbox debug halt

Postby michaln » 22. Jul 2016, 08:48

ggvbox951 wrote:The reason I put here is if this is a known problem that has been experienced before and whether has anyone seen it and might have a hint.

What you are doing is unusual enough that the likelihood of someone else seeing the same problem is effectively zero.
michaln
Oracle Corporation
 
Posts: 2958
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: problem with vbox debug halt

Postby ggvbox951 » 22. Jul 2016, 08:58

why do you think it is unusual enough?

"For the past few weeks I was launching the guest machine with -dbg option and use the step-into/halt/go to inspect the walk through the code that I was running."

Nobody uses debug feature? Or the symptom itself is unusual?
ggvbox951
 
Posts: 11
Joined: 24. May 2016, 20:38

Re: problem with vbox debug halt

Postby michaln » 22. Jul 2016, 09:04

ggvbox951 wrote:why do you think it is unusual enough?

"For the past few weeks I was launching the guest machine with -dbg option and use the step-into/halt/go to inspect the walk through the code that I was running."

I would estimate that upwards of 99% of VirtualBox users have no idea the --dbg option even exists. Considered globally, it is accurate to say that nobody uses the debug feature. The few exceptions are statistical noise.

Or the symptom itself is unusual?

With a sample size of one, everything is unusual.
michaln
Oracle Corporation
 
Posts: 2958
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: problem with vbox debug halt

Postby ggvbox951 » 22. Jul 2016, 20:11

ok, i am wondering if it can be pursued with oracle support. If not, I will have to re-install everything on that machine including host OS to see if it goes away. If that goes away, chance of pursuing it will be gone.
Yesterday i uninstalled the vbox and re-installed onto different folder but issue still persisted.
ggvbox951
 
Posts: 11
Joined: 24. May 2016, 20:38

Re: problem with vbox debug halt

Postby michaln » 22. Jul 2016, 20:21

ggvbox951 wrote:ok, i am wondering if it can be pursued with oracle support.

If you are a VirtualBox customer, yes. If you're not, this forum or the public bug tracker are your options.

You said "However starting yesterday, I ran into weird problem". The obvious question is what changed in your setup between working and non-working state. Surely you have some idea?
michaln
Oracle Corporation
 
Posts: 2958
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: problem with vbox debug halt

Postby ggvbox951 » 25. Jul 2016, 19:49

Finally I nailed it. I knew it was something very simple. Had to change the O/S type from Windows XP to Other->DOS and halt is working as expected. Mystery remains why it halts in BIOS segment while do a stop while executing jmp $ loop, but for now it is not the immediate concern now.
ggvbox951
 
Posts: 11
Joined: 24. May 2016, 20:38

Re: problem with vbox debug halt

Postby ggvbox951 » 26. Jul 2016, 18:49

NO IT IS STILL NOT WORKING. NOW I AM SEEING ON MULTIPLE MACHINES THAT IT STOP ON F000 segment and as far as I am concerned it is completely RANDOM. SPAM_SEARCH it.
ggvbox951
 
Posts: 11
Joined: 24. May 2016, 20:38


Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 1 guest