Bug 172160

Summary: 1.95.2.2 revision of amr.c breaks amrstat
Product: Base System Reporter: lampa
Component: kernAssignee: John Baldwin <jhb>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 9.1-PRERELEASE   
Hardware: Any   
OS: Any   

Description lampa 2012-09-29 15:10:04 UTC
amrstat stopped working at all after 1.95.2.2 revision of amr.c

Fix: this change seems to be sufficient to get amrstat working again:



/* build the command */
      ac->ac_data = dp;
!     ac->ac_length = real_length;
      ac->ac_flags |= AMR_CMD_DATAIN|AMR_CMD_DATAOUT;

      /* run the command */
--- 919,925 ----

      /* build the command */
      ac->ac_data = dp;
!     ac->ac_length = au_length;
      ac->ac_flags |= AMR_CMD_DATAIN|AMR_CMD_DATAOUT;

      /* run the command */--LAeUQaYaYoImgTx0j1WWBLlwcqepP7J1I56hs1f4S66ZD7Od
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

*** amr.c       2012-05-30 18:13:10.000000000 +0200
--- amr.c.my    2012-09-21 10:12:37.000000000 +0200
***************
*** 919,925 ****
Comment 1 tom 2012-12-07 14:12:29 UTC
We encountered the same/similar behavior on a pair of Dell 1750 servers
(i386). In our experience, amrstat works intermittently, with no apparent
cause for it to work/not work.

We applied the suggested patch on 12/3/12, and have not seen any issues
since.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2012-12-07 16:12:25 UTC
Responsible Changed
From-To: freebsd-bugs->eadler

I'll take it.
Comment 3 John Baldwin freebsd_committer freebsd_triage 2012-12-07 20:48:55 UTC
That patch does not fix this.  It just reverts the bug fix exposing you
to all the previous problems.  The proper fix is to backport r240692 and
r241228 from HEAD to 9.  Please see the original PR kern/155658 for more
discussion on this.

-- 
John Baldwin
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2012-12-09 00:53:12 UTC
Responsible Changed
From-To: eadler->jhb

per discussion - see kern/155658
Comment 5 John Baldwin freebsd_committer freebsd_triage 2013-03-04 18:58:36 UTC
State Changed
From-To: open->closed

The fix was merged to 8 and 9 last week.