Giter Club home page Giter Club logo

Comments (12)

teawater avatar teawater commented on July 25, 2024

Could you tell me your ubuntu version?

from cma.

leonumix avatar leonumix commented on July 25, 2024

Sorry, I should have mentioned that was a x86 32bit.

Leon

From: Hui Zhu [mailto:[email protected]]
Sent: Wednesday, June 18, 2014 11:00 AM
To: teawater/cma
Cc: leonumix
Subject: Re: [cma] arch.get_arg1() pops up 'Cannot access memory at address 0x9' (#1)

Could you tell me which arch are you using?


Reply to this email directly or view it on GitHub #1 (comment) . https://github.com/notifications/beacon/7918894__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxODY3OTU3OSwiZGF0YSI6eyJpZCI6MzQ5MTU1OTh9fQ==--8010379e5441b1ef1acfc97a06faa2a329023a80.gif


Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from

your system. Thank you.

from cma.

leonumix avatar leonumix commented on July 25, 2024

ubuntu-12.04.3-desktop-i386, rebuild kernel to 3.3.8

Leon

From: Hui Zhu [mailto:[email protected]]
Sent: Wednesday, June 18, 2014 11:02 AM
To: teawater/cma
Cc: leonumix
Subject: Re: [cma] arch.get_arg1() pops up 'Cannot access memory at address 0x9' (#1)

Could you tell me your ubuntu version?


Reply to this email directly or view it on GitHub #1 (comment) . https://github.com/notifications/beacon/7918894__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxODY3OTcxMiwiZGF0YSI6eyJpZCI6MzQ5MTU1OTh9fQ==--64cabe87b01ce141ac3a4a44112f18c98887142b.gif


Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from

your system. Thank you.

from cma.

teawater avatar teawater commented on July 25, 2024

Could you help me after get the error, input some commands and post the output?

return long(gdb.parse_and_eval("*(unsigned long *)($ebp+8)"))
gdb.MemoryError: Cannot access memory at address 0x10
(gdb)

After this part:
info registers
p $pc
up
p $pc

from cma.

leonumix avatar leonumix commented on July 25, 2024

Sure, please allow me to have a lunch and get you back afternoon.

By the way, I was changed the script to replace all ‘malloc’ to ‘kmalloc’ and ‘kfree’ (kmalloc/kfree was used by redis for its allocator). ran successfully and got csv file.

Leon

From: Hui Zhu [mailto:[email protected]]
Sent: Wednesday, June 18, 2014 11:35 AM
To: teawater/cma
Cc: leonumix
Subject: Re: [cma] arch.get_arg1() pops up 'Cannot access memory at address 0x9' (#1)

Could you help me after get the error, input some commands and post the output?

return long(gdb.parse_and_eval("*(unsigned long *)($ebp+8)"))
gdb.MemoryError: Cannot access memory at address 0x10
(gdb)

After this part:
info registers
p $pc
up
p $pc


Reply to this email directly or view it on GitHub #1 (comment) . https://github.com/notifications/beacon/7918894__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxODY4MTY4MiwiZGF0YSI6eyJpZCI6MzQ5MTU1OTh9fQ==--237b42a47732818734e17b07dc0963ee0749ef27.gif


Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from

your system. Thank you.

from cma.

leonumix avatar leonumix commented on July 25, 2024

(gdb) info registers

eax 0x0 0

ecx 0x1 1

edx 0xb7e0a85e -1210013602

ebx 0xb7f7dff4 -1208492044

esp 0xbffff0ac 0xbffff0ac

ebp 0x8 0x8

esi 0x0 0

edi 0x0 0

eip 0xb7e51d80 0xb7e51d80

eflags 0x286 [ PF SF IF ]

cs 0x73 115

ss 0x7b 123

ds 0x7b 123

es 0x7b 123

fs 0x0 0

gs 0x33 51

(gdb) p $pc

$1 = (void (*)()) 0xb7e51d80

(gdb) up

#1 0xb7e52583 in realloc () from /lib/i386-linux-gnu/libc.so.6

(gdb) p $pc

$2 = (void (*)()) 0xb7e52583 <realloc+627>

Leon

From: Hui Zhu [mailto:[email protected]]
Sent: Wednesday, June 18, 2014 11:35 AM
To: teawater/cma
Cc: leonumix
Subject: Re: [cma] arch.get_arg1() pops up 'Cannot access memory at address 0x9' (#1)

Could you help me after get the error, input some commands and post the output?

return long(gdb.parse_and_eval("*(unsigned long *)($ebp+8)"))
gdb.MemoryError: Cannot access memory at address 0x10
(gdb)

After this part:
info registers
p $pc
up
p $pc


Reply to this email directly or view it on GitHub #1 (comment) .图像已被发件人删除。


Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from

your system. Thank you.

from cma.

teawater avatar teawater commented on July 25, 2024

I fix this bug in new version of cma.py. Could you help me try it?

And I also add kmalloc and kfree support.

from cma.

leonumix avatar leonumix commented on July 25, 2024

I’m in vacation these couple days. I will try it tomorrow.

Leon

From: Hui Zhu [mailto:[email protected]]
Sent: Monday, June 23, 2014 7:11 PM
To: teawater/cma
Cc: leonumix
Subject: Re: [cma] arch.get_arg1() pops up 'Cannot access memory at address 0x9' (#1)

I fix this bug in new version of cma.py. Could you help me try it?

And I also add kmalloc and kfree support.


Reply to this email directly or view it on GitHub #1 (comment) .图像已被发件人删除。


Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from

your system. Thank you.

from cma.

leonumix avatar leonumix commented on July 25, 2024

Tried the new version twice. It was different with last time. It stuck on strdup call this time. see below runtime result (you may notice redis-server didn’t finished loading in gdb but did loading without gdb):

root@ubuntu:/mnt/hgfs/db/src# gdb ./redis-server

GNU gdb (GDB) 7.7.1

Copyright (C) 2014 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. Type "show copying"

and "show warranty" for details.

This GDB was configured as "i686-pc-linux-gnu".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

http://www.gnu.org/software/gdb/bugs/.

Find the GDB manual and other documentation resources online at:

http://www.gnu.org/software/gdb/documentation/.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from redis-server...done.

(gdb)

(gdb) source /root/c

cma.conf cma.py cmp_read_mmap core

(gdb) source /root/cma.py

Please Input the config file:[/mnt/hgfs/db/src/cma.conf]

[0] English

[1] Chinese

Which language do you want to use?0

Please Input the file for record info:[/mnt/hgfs/db/src/cma.csv]

Record the infomation of released memory? Yes/No:y

Record backtrace infomation? Yes/No:y

Do you want to record memory function malloc/calloc/realloc/free? [Yes]/No:y

Continuing.

Breakpoint 2, 0xb7e51d80 in malloc () from /lib/i386-linux-gnu/libc.so.6

^C[0] Record memory infomation to "/mnt/hgfs/db/src/cma.csv".

[1] Continue.

[2] Quit.

Which operation?[0]0

Traceback (most recent call last):

File "/root/cma.py", line 547, in

breaks[r.group(1)].event()

File "/root/cma.py", line 349, in event

not_released_add(arch.get_ret(), size, self.memtype)

File "/root/cma.py", line 222, in not_released_add

not_released[addr].append(get_info_line(True))

File "/root/cma.py", line 163, in get_info_line

s = str(gdb.execute("info line *$pc", True, True)).strip()

File "/root/cma.py", line 270, in sigint_handler

record_save()

File "/root/cma.py", line 182, in record_save

line = "'%s', '0x%x', '%d', '%f', '%s', ''" %(not_released[addr][3], addr, not_released[addr][0], cur - not_released[addr][2], not_released[addr][1])

IndexError: list index out of range

(gdb) info registers

eax 0x8102008 135274504

ecx 0x0 0

edx 0xb7f7e440 -1208490944

ebx 0xb7f7dff4 -1208492044

esp 0xbffff160 0xbffff160

ebp 0xbffff1c8 0xbffff1c8

esi 0xbffff44f -1073744817

edi 0x23 35

eip 0xb7e55c31 0xb7e55c31 <strdup+49>

eflags 0x286 [ PF SF IF ]

cs 0x73 115

ss 0x7b 123

ds 0x7b 123

es 0x7b 123

fs 0x0 0

gs 0x33 51

(gdb) p $pc

$1 = (void (*)()) 0xb7e55c31 <strdup+49>

(gdb) up

#1 0x080a9abc in spt_init (argc=1, argv=0xbffff2c4) at setproctitle.c:173

173 if (!(SPT.arg0 = strdup(argv[0])))

(gdb) up

#2 0x08062def in main (argc=1, argv=0xbffff2c4) at redis.c:3084

3084 spt_init(argc, argv);

(gdb)

root@ubuntu:/mnt/hgfs/db/src# ./redis-server

[7931] 25 Jun 15:45:17.975 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf

[7931] 25 Jun 15:45:18.021 * Increased maximum number of open files to 10032 (it was originally set to 1024).

[7931] 25 Jun 15:45:18.028 # Warning: 32 bit instance detected but no memory limit set. Setting 3 GB maxmemory limit with 'noeviction' policy now.

            _._                                                  

       _.-``__ ''-._                                             

  _.-``    `.  `_.  ''-._           Redis 2.8.11 (00000000/0) 32 bit

.-`.-``.```/ ., ''-._

( ' , .-|, ) Running in stand alone mode

|-._-...-__...-.``-._|' _.-'| Port: 6379

| -._._ / _.-' | PID: 7931

-._-._ `-./ _.-' _.-'

|-._-._ `-.__.-' .-'.-'|

| -._-._ .-'.-' | http://redis.io

-._-.`-.__.-'.-' _.-'

|-._-._ `-.__.-' .-'.-'|

| -._-._ .-'.-' |

-._-.`-.__.-'.-' _.-'

  `-._    `-.__.-'    _.-'                                       

      `-._        _.-'                                           

          `-.__.-'                                               

[7931] 25 Jun 15:45:18.029 # Server started, Redis version 2.8.11

[7931] 25 Jun 15:45:18.029 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

[7931] 25 Jun 15:45:18.030 * The server is now ready to accept connections on port 6379

From: Hui Zhu [mailto:[email protected]]
Sent: Wednesday, June 18, 2014 11:35 AM
To: teawater/cma
Cc: leonumix
Subject: Re: [cma] arch.get_arg1() pops up 'Cannot access memory at address 0x9' (#1)

Could you help me after get the error, input some commands and post the output?

return long(gdb.parse_and_eval("*(unsigned long *)($ebp+8)"))
gdb.MemoryError: Cannot access memory at address 0x10
(gdb)

After this part:
info registers
p $pc
up
p $pc


Reply to this email directly or view it on GitHub #1 (comment) . https://github.com/notifications/beacon/7918894__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxODY4MTY4MiwiZGF0YSI6eyJpZCI6MzQ5MTU1OTh9fQ==--237b42a47732818734e17b07dc0963ee0749ef27.gif


Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from

your system. Thank you.

from cma.

teawater avatar teawater commented on July 25, 2024

I so sorry that I didn't test cma with redis-server.
Now, I did it and fixed a lot of issues around it. Could you help me try the new version?

from cma.

leonumix avatar leonumix commented on July 25, 2024

It works again! tried 3 times, only got a traceback one time while press ctrl ^ C, the others got csv files successfully. The traceback should not be a big as we are debugging and we can try again. I think you can mark this issue as fixed. Thank you for your hard work!

The traceback attached below whatever:

Breakpoint 5, 0xb7e50260 in free () from /lib/i386-linux-gnu/libc.so.6

Continuing.

Breakpoint 5, 0xb7e50260 in free () from /lib/i386-linux-gnu/libc.so.6

^CTraceback (most recent call last):

File "/root/cma.py", line 549, in

breaks[r.group(1)].event()

File "/root/cma.py", line 373, in event

gdb.execute("finish", False, True)

KeyboardInterrupt: Quit

(gdb) bt

#0 0xb7e50260 in free () from /lib/i386-linux-gnu/libc.so.6

#1 0xb7e18c3d in vfprintf () from /lib/i386-linux-gnu/libc.so.6

#2 0xb7e4026b in vsnprintf () from /lib/i386-linux-gnu/libc.so.6

#3 0xb7e22f43 in snprintf () from /lib/i386-linux-gnu/libc.so.6

#4 0x08064d97 in zmalloc_get_rss () at zmalloc.c:369

#5 0x0805d494 in serverCron (eventLoop=0x60037350, id=0, clientData=0x0) at redis.c:1029

#6 0x0805915e in processTimeEvents (eventLoop=0x60037350) at ae.c:311

#7 0x08059444 in aeProcessEvents (eventLoop=0x60037350, flags=3) at ae.c:423

#8 0x0805954f in aeMain (eventLoop=0x60037350) at ae.c:455

#9 0x08063314 in main (argc=1, argv=0xbffff2d4) at redis.c:3178

Leon

From: Hui Zhu [mailto:[email protected]]
Sent: Friday, June 27, 2014 4:33 PM
To: teawater/cma
Cc: leonumix
Subject: Re: [cma] arch.get_arg1() pops up 'Cannot access memory at address 0x9' (#1)

I so sorry that I didn't test cma with redis-server.
Now, I did it and fixed a lot of issues around it. Could you help me try the new version?


Reply to this email directly or view it on GitHub #1 (comment) .图像已被发件人删除。


Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from

your system. Thank you.

from cma.

teawater avatar teawater commented on July 25, 2024

Thanks.
Report it as a new issue #2

from cma.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.