Nature of operations and summary of significant accounting policies (Asset Impairment) (Detail) - Predecessor
$ in Thousands
1 Months Ended 12 Months Ended
Oct. 31, 2016
USD ($)
Rig
Dec. 31, 2016
USD ($)
Dec. 31, 2015
USD ($)
Rig
Dec. 31, 2014
USD ($)
Long Lived Assets Held For Sale [Line Items]        
Loss on impairment of other assets   $ 1,393 $ 16,207 $ 0
Number of drilling rigs to be sold | Rig     4  
Number of drilling rigs to be sold | Rig 4      
Sale price of drilling rigs $ 2,000      
Sale of property closing period 2017-01      
Upstream Equipment        
Long Lived Assets Held For Sale [Line Items]        
Loss on impairment of other assets     $ 6,015