We investigate coupled flow and geomechanics in gas production from extremely low-permeability reservoirs such as tight- and shale-gas reservoirs, using dynamic porosity and permeability during numerical simulation. In particular, we take the intrinsic permeability as a step function of the status of material failure, and the permeability is updated every timestep. We consider gas reservoirs with the vertical and horizontal primary fractures, using the single- and dynamic double-porosity (dual-continuum) models. We modify the multiple-porosity constitutive relations for modeling the double porous continua for flow and geomechanics. The numerical results indicate that the production of gas causes redistribution of the effective-stress fields, increasing the effective shear stress and resulting in plasticity. Shear failure occurs not only near the fracture tips but also away from the primary fractures, which indicates the generation of secondary fractures. These secondary fractures increase the permeability significantly, and change the flow pattern, which, in turn, causes a change in the distribution of geomechanical variables. From various numerical tests, we find that shear failure is enhanced by a large pressure drop at the production well, a high Biot's coefficient, and low frictional and dilation angles. Smaller spacing between the horizontal wells also contributes to faster secondary fracturing. When the dynamic double-porosity model is used, we observe a faster evolution of the enhanced-permeability areas than that obtained from the single-porosity model, mainly because of a higher permeability of the fractures in the double-porosity model. These complicated physics for stress-sensitive reservoirs cannot properly be captured by the uncoupled or flow-only simulation, and, thus, tightly coupled flow and geomechanical models are highly recommended to describe accurately the reservoir behavior during gas production in tight- and shale-gas reservoirs and to design production scenarios smartly.