This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Array overflow when no array is used
- From: Vincent Bernat <bernat at luffy dot cx>
- To: systemtap at sourceware dot org
- Date: Mon, 30 Sep 2013 14:25:27 +0200
- Subject: Re: Array overflow when no array is used
- Authentication-results: sourceware.org; auth=none
- References: <8738omd222 dot fsf at guybrush dot luffy dot cx>
â 30 septembre 2013 12:41 CEST, Vincent Bernat <bernat@luffy.cx>Â:
> For example:
>
> probe process("/usr/lib/php5/20090626/apc.so").function("apc_cache_make_file_key").return {
> printf("%p\n", $key);
> }
>
> I get some values and a few seconds later, I get:
>
> ERROR: Array overflow, check MAXMAPENTRIES near identifier '$key' at ./apc-cache-miss.stp:4:20
>
> Where does it get an array?
I have looked at the generated code and discovered that local variables
are in fact a map keyed by TID. Since I have many concurrent processes,
I just increased MAXMAPENTRIES to get rid of the error. The error
message is quite unclear in this case.
I now needs to investigate why I get bad values for $key in some cases.
> typedef union _apc_cache_key_data_t {
> struct {
> apc_dev_t device; /* the filesystem device */
> apc_ino_t inode; /* the filesystem inode */
> } file;
> struct {
> const char *identifier;
> int identifier_len;
> } user;
> struct {
> const char *fullpath;
> int fullpath_len;
> } fpfile;
> } apc_cache_key_data_t;
Will such a structure be problematic for systemtap?
--
panic("mother...");
2.2.16 /usr/src/linux/drivers/block/cpqarray.c