Dislocation pileups between a finite crack tip and a grain boundary with a dislocation‐free zone is investigated by the method of continuous dislocation modeling. Analytic solutions of both the dislocation distributions inside the crack and plastic zone and the stress field in the space are obtained. The stress intensity factor at the crack tip and the stress concentration at the grain boundary are derived. When the applied stress exceeds τΛ0 [cos-1(c/a),k], the dislocations emitted from the crack tip pile up on the grain boundary. Note that Λ0 is the Heuman lambda function and τ is the lattice friction stress. a and c are the grain size and surface crack length, respectively. K is defined as (c/b)≪rl≫(a2-b2)/(a2-c2)≪rlx,≫, where (b-c) is the dislocation‐free zone. The stress concentration at the grain boundary increases with increasing grain size but decreases with increasing dislocation‐free zone. In contrast, if the applied stress is less than or equal to τΛ0 [cos-1(c/a),k], no stress concentration exists at the grain boundary. The stress intensity factor at the crack tip increases with increasing size of dislocation‐free zone but decreases with increasing grain size. Our results are reduced to several special cases.