Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7628305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:34:38+00:00 2026-05-31T05:34:38+00:00

I encountered such error when executing ni command during gdb debugging: Warning: Cannot insert

  • 0

I encountered such error when executing ni command during gdb debugging:

Warning:
Cannot insert breakpoint 0.
Error accessing memory address 0x3ac706a: Input/output error.

0xf6fa4771 in siglongjmp () from /lib/libc.so.6

To investigate what problem gdb meets with I strace gdb and get such output:

rt_sigprocmask(SIG_BLOCK, NULL, [RT_1], 8) = 0
ptrace(PTRACE_PEEKTEXT, 651, 0xcc4fdf60, [0x1cc4fe470]) = 0
ptrace(PTRACE_PEEKTEXT, 651, 0xcc4fe480, [0x3ac706a4506fa1d]) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RT_1], 8) = 0
…
…
rt_sigprocmask(SIG_BLOCK, NULL, [RT_1], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RT_1], 8) = 0
ptrace(PTRACE_GETREGS, 27781, 0, 0x7fff8990e8b0) = 0
ptrace(PTRACE_PEEKTEXT, 27781, 0x3ac7068, [0x28b]) = -1 EIO (Input/output error)
ptrace(PTRACE_PEEKTEXT, 27781, 0x3ac7068, [0x28b]) = -1 EIO (Input/output error)

It implies that gdb first ptrace at memory address 0xcc4fe480 and gets value 0x3ac706a4506fa1d (actually a 8-byte value 0x03ac706a4506fa1d). Later it gets an aligned address 0x3ac7068 from the first 4 bytes of that value, which is an invalid address and causes gdb fails to ptrace.

Content of /proc/[pid]/maps:

cbce2000-cc353000 r-xp 00000000 08:03 295479 xxx.so
cc353000-cc3f0000 r–p 00670000 08:03 295479 xxx.so
cc3f0000-cc3f6000 rw-p 0070d000 08:03 295479 xxx.so
cc3f6000-cc3fe000 rw-p cc3f6000 00:00 0
cc3fe000-cc3ff000 —p cc3fe000 00:00 0
cc3ff000-cc4ff000 rwxp cc3ff000 00:00 0
cc4ff000-cc500000 —p cc4ff000 00:00 0

cc500000-cc600000 rwxp cc500000 00:00 0
cc62d000-cc673000 r-xp 00000000 08:03 295545 yyy.so
cc673000-cc674000 —p 00046000 08:03 295545 yyy.so
cc674000-cc675000 r–p 00046000 08:03 295545 yyy.so
cc675000-cc676000 rw-p 00047000 08:03 295545 yyy.so

It shows that address 0xcc4fe480 is from the section with bold font above. This section is not related to any .so or bin file.

This question is actually related to another question http://stackoverflow.com/questions/9564417/gdb-cant-insert-internal-breakpoint, which has not been resolved yet. I found these problems during the investigation of previous issue.

I have 3 questions here:
1. Take a look at strace output for ptrace here:
ptrace(PTRACE_PEEKTEXT, 651, 0xcc4fe480, [0x3ac706a4506fa1d]) = 0
Why is the last parameter annotated by square brackets? Does it mean it represent the return value? Manual page says ptrace should return the word read for PTRACE_PEEKTEXT, but it looks strace output does not follow that, so I suspect it shows return value in the last parameter.
2. There’s a section (who with bold font) between two .so but not associated with any inode. What does such section represent?
3. Gdb reads one word from that section and uses that word as an address, but actually that’s an invalid address. What are the possible causes of such error?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:34:38+00:00Added an answer on May 31, 2026 at 5:34 am
    1. Take a look at strace output for ptrace here:
      ptrace(PTRACE_PEEKTEXT, 651, 0xcc4fe480, [0x3ac706a4506fa1d]) = 0
      Why is the last parameter annotated by square brackets? Does it mean it represent the return value?

    Correct.

    1. There’s a section (who with bold font) between two .so but not associated with any inode. What does such section represent?

    It is a region of memory that has been mmaped with MAP_ANONYMOUNS flag (i.e. it doesn’t correspond to any file on disk).

    Since the size of that region is exactly 1MB, and since it is surrounded by private regions mapped with PROT_NONE, it is a safe bet that this region represents some thread stack, surrounded by stack guard zones.

    1. Gdb reads one word from that section and uses that word as an address, but actually that’s an invalid address. What are the possible causes of such error?

    For some reason GDB believes that there should be code at address 0x3ac7068, and wants to place an internal breakpoint there. GDB uses internal breakpoints to keep track of loaded shared libraries (among other things).

    Output from maintenance info break should reveal what code GDB believes is residing at the “bad” address.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have often encountered an error such as cannot convert from 'method group' to
When would the ItemContainerGenerator.Status enumeration return GeneratorStatus.Error in WPF? Has anyone encountered such a
In the process of refactoring some code, I encountered several build errors such as
Has anyone encountered such a beastie? I'm thinking about a tree-like display, database, login
Is there such a thing? It is the first time I encountered a practical
I encountered the above error message after applying the OutputCache attribute on ActionResult methods
I've recently encountered the error: System.Data.SqlClient.SqlException: The transaction log for database 'mydatabase' is full.
Recently, I encountered a BEFORE INSERT OR UPDATE trigger on a table. In this
C has perror and errno, which print and store the last error encountered. This
Whilst compiling with avr-gcc I have encountered linker errors such as the following: undefined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.