From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68123 invoked by alias); 24 Aug 2017 16:28:46 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 67682 invoked by uid 89); 24 Aug 2017 16:28:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: mail-wm0-f50.google.com Received: from mail-wm0-f50.google.com (HELO mail-wm0-f50.google.com) (74.125.82.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Aug 2017 16:28:43 +0000 Received: by mail-wm0-f50.google.com with SMTP id a70so8055015wmd.1 for ; Thu, 24 Aug 2017 09:28:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=57A9aOF5S9H3boyBXqONxuSFfu/53iTDW9OFLbKs/2o=; b=t0UvYWInJACeGP0rORYYooUJTmLb5CeTyewC0NE/rz5wbfRPK/eoKPHrh4IWYUV0JO VPh64EdtWqzUQZ8Xv5eyhZsojAytH1pPltRsZqXzSPw/RElDkH829MO8UjibYNv/rp8E sCgp48nbGMxWhoRTbczi0B5ximig9NZkZeKH6jLzmIb3nmNhy0bUQ0He095ojipCj13z w8UJSStdk2QBFYbXPAZr85eWDYSnJzbeOeEpKenYZ5CMj+AjRfQsUgMxEuBhLSEGJiM5 /qDjyXsE7VqQZNI47oymEl4mFfducb10reRuXH3RbKbBviFvlSEMnxsSbyRKU+IPtdjo Vu9Q== X-Gm-Message-State: AHYfb5hAPNITtM1jCH9P4HBCzHd/e7x5TGzvGxhVbRaQsEi8vxt2K8YF i5/Hm1JEM2k/DQ+/oyEcEbMz2UX9Qp/B X-Received: by 10.80.216.141 with SMTP id p13mr6948876edj.10.1503592121533; Thu, 24 Aug 2017 09:28:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.148.206 with HTTP; Thu, 24 Aug 2017 09:28:21 -0700 (PDT) In-Reply-To: References: From: Arkady Date: Thu, 24 Aug 2017 16:28:00 -0000 Message-ID: Subject: Re: Failure in syscall.open probe To: systemtap@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-q3/txt/msg00129.txt.bz2 Update 2 I made the script shorter - failed after 400 driver restarts global ARRAY_FILENAME_PID% global ARRAY_TIMESTAMP_OPEN% function current_time:long() %{ /* pure */ struct timespec now = current_kernel_time(); STAP_RETURN(timespec_to_ns(&now)); %} probe syscall.open { tid = tid() ARRAY_FILENAME_PID[tid] = filename ARRAY_TIMESTAMP_OPEN[tid] = current_time() } probe syscall.open.return { tid = tid(); delete ARRAY_FILENAME_PID[tid] delete ARRAY_TIMESTAMP_OPEN[tid] } On Thu, Aug 24, 2017 at 5:35 PM, Arkady wrote: > Update > The build line can be as short as > > stap -g -p4 -m test_open -v -k test_open.stp > > > On Thu, Aug 24, 2017 at 5:26 PM, Arkady wrote: >> Hi, >> >> I am trying the following code >> https://gist.github.com/larytet/5c361b1a4ee967655f500909026978f9 >> - the script is mostly syscall.open and syscall.open.return >> >> on CentOS release 6.9 (Final) >> kernel 2.6.32-696.3.2.el6.x86_64 #1 SMP Tue Jun 20 01:26:55 UTC 2017 >> x86_64 x86_64 x86_64 GNU/Linux >> >> g++ (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6) >> >> I use a custom build of 3.1 release of Systemtap >> Systemtap translator/driver (version 3.1/0.164, commit >> release-2.9-1416-gb8ea350dc13a) >> Copyright (C) 2005-2017 Red Hat, Inc. and others >> This is free software; see the source for copying conditions. >> tested kernel versions: 2.6.18 ... 4.10-rc8 >> enabled features: PYTHON2 NLS >> >> Build command stap -g -p4 -m test_open -g --suppress-time-limits -v -k >> -D MAXSKIPPED=0 -D MAXTRYLOCK=100000 -D TRYLOCKDELAY=1 test_open.stp >> >> I restart the script using the following bash one liner >> count=0;while [ 1 ];do echo $count;count=$(($count+1));sudo rmmod >> test_open;sudo staprun test_open.ko -L ;done; >> >> 30-50 restarts later I get an exception: >> >> Aug 24 10:13:52 localhost kernel: <#DB> [] ? >> __schedule_bug+0x44/0x50 >> Aug 24 10:13:52 localhost kernel: [] ? schedule+0xa4c/0xb70 >> Aug 24 10:13:52 localhost kernel: [] ? vsnprintf+0x336/0x5e0 >> Aug 24 10:13:52 localhost kernel: [] ? >> __cond_resched+0x2a/0x40 >> Aug 24 10:13:52 localhost kernel: [] ? _cond_resched+0x30/0x40 >> Aug 24 10:13:52 localhost kernel: [] ? >> strncpy_from_user+0x4a/0x90 >> Aug 24 10:13:52 localhost kernel: [] ? >> function___global_user_string_quoted__overload_0+0x460/0x890 >> [test_open] >> Aug 24 10:13:52 localhost kernel: [] ? >> _new_map_create+0x3e/0xa0 [test_open] >> Aug 24 10:13:52 localhost kernel: [] ? >> probe_3606+0x101/0x400 [test_open] >> Aug 24 10:13:52 localhost kernel: [] ? sys_open+0x1/0x30 >> Aug 24 10:13:52 localhost kernel: [] ? >> enter_kprobe_probe+0x1c0/0x2d0 [test_open] >> Aug 24 10:13:52 localhost kernel: [] ? >> aggr_pre_handler+0x5b/0xb0 >> Aug 24 10:13:52 localhost kernel: [] ? sys_open+0x0/0x30 >> Aug 24 10:13:52 localhost kernel: [] ? sys_open+0x1/0x30 >> Aug 24 10:13:52 localhost kernel: [] ? >> kprobe_exceptions_notify+0x3d5/0x430 >> Aug 24 10:13:52 localhost kernel: [] ? >> notifier_call_chain+0x55/0x80 >> Aug 24 10:13:52 localhost kernel: [] ? >> atomic_notifier_call_chain+0x1a/0x20 >> Aug 24 10:13:52 localhost kernel: [] ? notify_die+0x2e/0x30 >> Aug 24 10:13:52 localhost kernel: [] ? do_int3+0x35/0xb0 >> Aug 24 10:13:52 localhost kernel: [] ? int3+0x33/0x40 >> Aug 24 10:13:52 localhost kernel: [] ? sys_open+0x0/0x30 >> >> Thank you, Arkady.